Author: dicka Date: Mon Mar 27 08:03:40 2006 New Revision: 389181 URL: http://svn.apache.org/viewcvs?rev=389181&view=rev Log: Updates to Axis C++ Website documentation. Including: - addition of Trace guide - addition of XSD Objects developers guide (previously only available within package, not on web site) - updates to Contributors list Added: webservices/axis/trunk/site/src/cpp/src/documentation/content/xdocs/cpp/TraceGuide.ihtml webservices/axis/trunk/site/src/cpp/src/documentation/content/xdocs/cpp/arch/XSD_Objects.ihtml webservices/axis/trunk/site/src/cpp/src/documentation/content/xdocs/cpp/images/c/XSDObjects_Heirarchy.gif (with props) webservices/axis/trunk/site/src/cpp/src/documentation/content/xdocs/cpp/images/c/XSD_Decimal_DerivedTypes.JPG (with props) webservices/axis/trunk/site/src/cpp/src/documentation/content/xdocs/cpp/images/c/XSD_Objects_Heirarchy.JPG (with props) webservices/axis/trunk/site/src/cpp/src/documentation/content/xdocs/cpp/images/c/XSD_PrimitiveTypes.JPG (with props) webservices/axis/trunk/site/src/cpp/src/documentation/content/xdocs/cpp/images/c/XSD_String_DerivedTypes.JPG (with props) Modified: webservices/axis/trunk/site/src/cpp/src/documentation/content/xdocs/cpp/documentation.ihtml webservices/axis/trunk/site/src/cpp/src/documentation/content/xdocs/cpp/who.ihtml Added: webservices/axis/trunk/site/src/cpp/src/documentation/content/xdocs/cpp/TraceGuide.ihtml URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/site/src/cpp/src/documentation/content/xdocs/cpp/TraceGuide.ihtml?rev=389181&view=auto ============================================================================== --- webservices/axis/trunk/site/src/cpp/src/documentation/content/xdocs/cpp/TraceGuide.ihtml (added) +++ webservices/axis/trunk/site/src/cpp/src/documentation/content/xdocs/cpp/TraceGuide.ihtml Mon Mar 27 08:03:40 2006 @@ -0,0 +1,111 @@ + + + +The Axis C++ Trace Guide + + + + +

Introducion

+

This documents describes the trace facilities within Axis C++, how to +enable them and how to make use of the produced trace.

+

Contents

+ +

+

Runtime Trace

+

To aid the development team in understanding the problems of users, +the Axis C++ engine has been instrumented with trace.

+

+

Enabling runtime trace

+

Trace is enabled at runtime by adding the following to axiscpp.conf:

+

ClientLogPath:<path to log file>

+

+

Reading runtime trace

+

The Axis C++ runtime trace is produced in a format compatible with +the Trace Analyzer for WebSphere Application Server, which is available +from here:

+

Trace Analyzer +for WebSphere Application Server

+

However, it is also possible to use any text editor. Each line is made up of the following columns:

+ +

So, a typical entry would be:

+

[27/03/2006 16:21:48:945 Time] 4220 AxisConfig > getAxisConfProperty @00376358,[00000000] <....>

+ +

Some other things to watch for are:

+ + +

+

Startup Trace

+

One shortcoming of the runtime trace is that it only begins tracing +after the configuration file has been loaded and the ClientLogPath +entry read. This means any problems that occur before this, for example +while reading the configuration file, are missed. To overcome this the +Axis C++ engine has also been instrumented with startup trace, this +starts tracing at the first call into the Axis engine and everything up +to the point at which runtime trace starts.

+

Startup trace uses the same formatting as the runtime trace.

+

+

Enabling startup trace

+

Startup trace is enabled by setting the following environment +variable:

+

AXISCPP_STARTUP_TRACE=<path to startup log file>

+

+

Interesting Trace Entries

+

Here are a few entries well worth looking for when you first receive +a trace file.

+

Stub Destructor

+

Check lines in the trace file immediately preceding the entry for +~Stub, as this is typically the first method run following a SIGSEGV.

+

Exception Entries

+

Check any exception entries, which is indicated by an X in the 3rd +column. These actually indicate that an exception has been caught. If +you see @<number> this indicates which catch block, +if more than one present in the current method. You can use this, along +with the trace lines immediately preceding, to determine fairly closely +exactly where the trace was thrown. You will also see trace entries for +the exception constructor if it is an Axis C++ exception.

+

HTTPChannel::operator<<

+

The entry trace for operator<< on HTTPChannelshows +the message that will sent on the wire. Although the HTTP Header and +SOAP message tend to be in seperate calls to this method. This allows +for diagnosis of some problems with the message, without requiring the +use of a tcp/ip monitoring tool.

+ + Added: webservices/axis/trunk/site/src/cpp/src/documentation/content/xdocs/cpp/arch/XSD_Objects.ihtml URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/site/src/cpp/src/documentation/content/xdocs/cpp/arch/XSD_Objects.ihtml?rev=389181&view=auto ============================================================================== --- webservices/axis/trunk/site/src/cpp/src/documentation/content/xdocs/cpp/arch/XSD_Objects.ihtml (added) +++ webservices/axis/trunk/site/src/cpp/src/documentation/content/xdocs/cpp/arch/XSD_Objects.ihtml Mon Mar 27 08:03:40 2006 @@ -0,0 +1,133 @@ + + + + + +XSD Objects + + +

XSD Objects

+

XML Schema Part 2 : Datatypes

+

The types and formatting of data transmitted in a SOAP message is defined by the XML Schema, in particular Part 2 : Datatypes. The full specification can be seen here.

+

Built-in types

+

Within section +3 of the above specification 44 built-in datatypes are described, encompasing Strings, numeric, time and encoded binary datatypes. These datatypes are split into two groups, primitive and derived types.

+

+

Primitive Types

+

The XML schema provides 19 primitive types. As all data is represented in text form within XML, the value space for each datatype needs to be specified, for example numeric types cannot contain alphabetic characters. To do this, each type defines a number of contraining facets and the values within these facets allows the XML engine to validate the data. See Constraining Facets below for further information on how these are used.

+

The 19 primitive data types are: string, boolean, decimal, float, double, duration, dateTime, time, date, gYearMonth, gYear, gMonthDay, gDay, gMonth, hexBinary, base64Binary, anyURI, QName, NOTATION

See section +3.2 of the specification for full detail on each datatype.

+

Derived Types

+

The XML Schema allows additional types to be derived from the primitive types, and has 25 built-in derived types. 12 data types are derived from the string primitive data type.

+The 12 types derived from the string primitive data type are: normalizedString, token, language, Name, NCName, ID, IDREF, IDREFS, ENTITY, ENTITIES, NMTOKEN and NMTOKENS +

The remaining 13 data types are derived from the decimal primitive data type.

+ +

The 13 data types derived from the decimal primitive data type are: integer, nonPositiveInteger, negativeInteger, long, int, short, byte, nonNegativeInteger, unsignedLong, unsignedInt, unsignedShort, unsignedByte, positiveInteger

+

A derived type uses the same contraining facets as the type from which it is derived, but provides differing values for one or more facet so as to further restrict the value space. For example; the decimal allows fraction digits, while the integer derived type sets this facet to 0.

See section +3.3 of the specification for full detail on each datatype.

+

User defined derived types

+

In the same way as the XML Schema defines a number of built-in datatypes the user can also provide additional derived types. This can be done in the WSDL document, or an XSD referred from a WSDL document.

+

The following shows how you can create a new type called direction, which is derived from the NMTOKEN built-in type, to only have the values fromKey and toKey, by restricting the enumeration constraining facet.

+
	<xsd:simpleType name="direction">
+		<xsd:restriction base="NMTOKEN">
+			<xsd:enumeration value="fromKey"/>
+			<xsd:enumeration value="toKey"/>
+		</xsd:restriction>
+	</xsd:simpleType>
+

Constraining Facets

+

As mentioned above, the value spaces of each of the built-in types are controlled by constraining facets. The XML Schema provides 12 constraining facets, as described in section +4.3.

+

The 12 constraining facets are:

+ +

Each primitive datatype uses a subset of these contraining facets, to suit the characteristics of that particular datatype. Section +4.1.5 of the XML Schema provides a table of which facets are used for each datatype.

+

It is permitted for the value of a constraining facet to be undefined, with the exception of whitespace which must be specified as one of preserve, replace or collapse.

+
+

Axis C++ Implementation of XSD built-in types

+

C++ Objects

+

In version 1.5 of Apache Axis C++, an object model was introduced to the SOAP engine for the XSD built-in types. The object heirarchy mimics the order in which the datatypes are derived from each other.

+

IAnySimpleType Interface

+

All the XSD type objects implement the IAnySimpleType interface, which provides the following methods, which must be implemented by all implementing classes

+ +

In addition each implementation of this interface must provide a parameterized constructor, such that it can be constructed and will immediately serialize the provided value.

+

The IAnySimpleType interface provides the following utility method, which should be called by all implementing classes when serializing data.

+ +

This method resolves reserved characters (eg & is replaced by &amp;), processes Whitespace, validates Pattern and ensures value is contained within Enumeration.

+

Object Heirarchy

+

Below is a portion of the C++ object heirarchy, which, as you will notice, is very similar to the diagram +of built-in datatypes in the XSD Schema.

+

+

Mapping XSD built-in types to C/C++ types

+

Within the Axis engine mappings are provided between the XSD built-in types and the native C/C++ types. To aid understanding and maintain consistency, these are declared as typedefs to match the XSD type names. These typedefs should be used throughout the engine for:

+ +

C++ Types

+

The mapping from C++ types to the XSD built-in types is defined in AxisUserAPI.hpp. For each XSD built-in type a corresponding typedef is declared in the form xsd__<type>, eg: xsd__string.

+

Note: AxisUserAPI.hpp only declares those types currenty supported within the user API.

+

C Types

+

Similar to the C++ API, the mapping from C types to the XSD built-in types is defined in AxisUserAPI.h. A typedef is declared for each XSD built-in type, in the form xsdc__<type>, eg: xsdc__string.

+

IConstrainingFacet Interface

+

All the Constraining Facet objects implement the IConstrainingFacet interface. This provides the following utility method, which allows the XSD objects to determine if a given facet has been defined:

+ +

The following Constraining Facet objects provide utility methods to assist the serialization/deserialization of XSD built-in types:

+ +
+

Current Limitations

+

Function Limitation

+

Currently, the XSD objects are completely internal to the Axis engine. In the future we may wish to expose these on the external API, such that customers (via WSDL2Ws) will be able to derive additional simple types simply by refining one or more of the constraining facets, then simply re-using the serialization/deserialization logic we have already written.

+

Pattern Constraining Facet

+

The implementation of the pattern constraining facet is incomplete. It needs to validate against a given regular expression, following this, the pattern for each of data types needs to be updated with the regular expression to describe their particular data type.

+
+

References

+

XML Schema Part 2 : Datatypes - http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/

+

Outstanding Issues

+AXISCPP-291 - dateTime unable to support dates prior to 1970. + + Modified: webservices/axis/trunk/site/src/cpp/src/documentation/content/xdocs/cpp/documentation.ihtml URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/site/src/cpp/src/documentation/content/xdocs/cpp/documentation.ihtml?rev=389181&r1=389180&r2=389181&view=diff ============================================================================== --- webservices/axis/trunk/site/src/cpp/src/documentation/content/xdocs/cpp/documentation.ihtml (original) +++ webservices/axis/trunk/site/src/cpp/src/documentation/content/xdocs/cpp/documentation.ihtml Mon Mar 27 08:03:40 2006 @@ -34,15 +34,12 @@
  • ANT Build Guide
  • Reference Material

    -