AXIOM (AXIs Object Model)

This section describes AXIOM (AXIs Object Model) that allows us to build and parse XML elements represented as AXIOM objects.

From the previous tutorial, I learned how to invoke the operation with the sendReceive() method. Now I need to learn how to create the SOAP Body element using AXIOM (AXIs Object Model).

AXIOM offers these methods to create OM element and sub elements.

1. Getting the default OM factory:

   OMFactory factory = OMAbstractFactory.getOMFactory();

2. Creating an OM namespace:

   OMNamespace namespace = factory.createOMNamespace(tns, "hy");

3. Creating an OM element:

   OMElement request
      = factory.createOMElement("RegistrationRequest", namespace);

4. Adding an attribute to an OM element:

   request.addAttribute("event", "OpenGame", namespace);

5. Adding a sub element to an OM element:

   OMElement guest = factory.createOMElement("Guest", namespace);
   guest.setText("Herong Yang");

AXIOM offers these methods to parse OM elements.

1. Returning the local name of an OM element:

   name = response.getLocalName()

2. Returning the text content of an OM element:

   text = response.getText()

3. Returning the list of sub elements of an OM element:

   iterator = response.getChildElements()

4. Returning the list of attributes of an OM element:

   iterator = response.getAllAttributes()

Table of Contents

 About This Book

 Introduction to WSDL 2.0

 WSDL 2.0 Document Structure and Syntax

 WSDL Version 2.0 Part 2: Adjuncts

 WSDL 2.0 Document Examples with SOAP Binding

 Using WSDL Document in Java Apache Axis2/Java for WSDL

 Apache Woden for WSDL Documents in Java

 SoapUI - Web Service Testing Tool

 PHP SOAP Extension for WSDL

 Perl SOAP::Lite for WSDL

 Introduction to WSDL 1.1

 WSDL 1.1 Document Structure and Syntax

 WSDL 1.1 Binding Extension for SOAP 1.1

 SoapUI as WSDL 1.1 Testing Tool

 WSDL 1.1 and SOAP 1.1 Examples - Document and RPC Styles

 PHP SOAP Extension for WSDL 1.1

 Perl SOAP::Lite for WSDL 1.1

Apache Axis2/Java for WSDL 1.1

 Creating Service Client with WSDL 1.1 Document

 org.apache.axis2.client.Options - Operation Client Options

 sendReceive() Method - Invoking a Named Operation

 Turning Off the Chunked HTTP Flag

AXIOM (AXIs Object Model) - document/literal Style

 org.apache.axis2.rpc.client.RPCServiceClient Class - rpc/encoded Style - Socket Server Testing Program

 Capturing the HTTP Request from an Axis2 Client Program

 Using WSDL2Java to Generate Web Service Stub Classes

 WSDL 1.1 Binding Extension for SOAP 1.2

 WSDL 1.1 and SOAP 1.2 Examples - Document and RPC Styles

 SOAP 1.2 Binding - PHP, Java and Perl Clients

 Python SOAP Client: Zeep

 WSDL Related Terminologies

 Archived Tutorials


 Full Version in PDF/EPUB