apache axis что это
Apache axis что это
Table of Contents
Introduction
Welcome to Axis, the third generation of Apache SOAP!
What is SOAP?
SOAP is an XML-based communication protocol and encoding format for inter-application communication. Originally conceived by Microsoft and Userland software, it has evolved through several generations; the current spec is version, SOAP 1.2, though version 1.1 is more widespread. The W3C’s XML Protocol working group is in charge of the specification.
SOAP is widely viewed as the backbone to a new generation of cross-platform cross-language distributed computing applications, termed Web Services.
What is Axis?
Axis is the third generation of Apache SOAP (which began at IBM as «SOAP4J»). In late 2000, the committers of Apache SOAP v2 began discussing how to make the engine much more flexible, configurable, and able to handle both SOAP and the upcoming XML Protocol specification from the W3C.
After a little while, it became clear that a ground-up rearchitecture was required. Several of the v2 committers proposed very similar designs, all based around configurable «chains» of message «handlers» which would implement small bits of functionality in a very flexible and composable manner.
After months of continued discussion and coding effort in this direction, Axis now delivers the following key features:
Let us know what you think!
Please send feedback about the package to «axis-user@ws.apache.org». Also, Axis is registered in jira, the Apache bug tracking and feature-request database.
What’s in this release?
This release includes the following features:
What’s still to do?
Installing Axis and Using this Guide
See the Axis Installation Guide for instructions on installing Axis as a web application on your J2EE server.
Before running the examples in this guide, you’ll need to make sure that your CLASSPATH includes the following elements from the Axis binary distribution:
Consuming Web Services with Axis
Let’s take a look at an example Web Service client that will call the echoString method on the public Axis server at Apache.
Assuming you have a network connection active, this program can be run as follows:
You can see what happens to the arguments by looking at the SOAP request that goes out on the wire (look at the colored sections, and notice they match the values in the call above):
The String argument is automatically serialized into XML, and the server responds with an identical String, which we deserialize and print.
Note: To actually watch the XML flowing back and forth between a SOAP client and server, you can use the included tcpmon tool or SOAP monitor tool. See the appendix for an overview.
Naming Parameters
In the above example, you can see that Axis automatically names the XML-encoded arguments in the SOAP message «arg0», «arg1», etc. (In this case there’s just «arg0») If you want to change this, it’s easy! Before calling invoke() you need to call addParameter for each parameter and setReturnType for the return, like so:
Note that the param is now named «testParam» as expected.
Interoperating with «untyped» servers
Here’s what a typical response might look like to the echoString method:
There is also a similar method which allows you to specify the Java class of the expected return type:
Publishing Web Services with Axis
Let’s say we have a simple class like the following:
How do we go about making this class available via SOAP? There are a couple of answers to that question, but we’ll start with the easiest way Axis provides to do this, which takes almost no effort at all!
Now for step 2. hm, wait a minute. You’re done! You should now be able to access the service at the following URL (assuming your container serves on port 8080 and that your web application is called axis):
If you followed the link (and the deployment has been successful), you’ll see a message information you that there is a Web Service deployed here.
(Note that you may need to replace the «-p8080» with whatever port your J2EE server is running on)
Important: JWS web services are intended for simple web services. You cannot use packages in the pages, and as the code is compiled at run time you can not find out about errors until after deployment. Production quality web services should use Java classes with custom deployment.
Deploying via descriptors
We need to tell the RPCProvider that it should instantiate and call the correct class (e.g. samples.userguide.example3.MyService), and we do so by including
tags, giving the service one parameter to configure the class name, and another to tell the engine that any public method on that class may be called via SOAP (that’s what the «*» means; we could also have restricted the SOAP-accessible methods by using a space or comma separated list of available method names).
WSDD descriptors can also contain other information about services, and also other pieces of Axis called «Handlers» which we’ll cover in a later section.
Scoped Services
Axis supports scoping service objects (the actual Java objects which implement your methods) three ways. «Request» scope, the default, will create a new object each time a SOAP request comes in for your service. «Application» scope will create a singleton shared object to service all requests. «Session» scope will create a new object for each session-enabled client who accesses your service. To specify the scope option, you add a
to your service like this (where » value » is request, session, or application):
Using the AdminClient
argument. The default port is 8080. A typical invocation of the AdminClient looks like this:
If you want to prove to yourself that the deployment really worked, try undeploying the service and calling it again. There’s an «undeploy.wsdd» file in the example3/ directory which you can use just as you did the deploy.wsdd file above. Run the AdminClient on that file, then try the service Client again and see what happens.
You can also use the AdminClient to get a listing of all the deployed components in the server:
In there you’ll see services, handlers, transports, etc. Note that this listing is an exact copy of the server’s «server-config.wsdd» file, which we’ll talk about in more detail a little later.
Now let’s start to explore some of the more powerful features of the Axis engine. Let’s say you want to track how many times your service has been called. We’ve included a sample handler in the samples/log directory to do just this. To use a handler class like this, you first need to deploy the Handler itself, and then use the name that you give it in deploying a service. Here’s a sample deploy.wsdd file (this is example 4 in samples/userguide):
The first section defines a Handler called «track» that is implemented by the class samples.userguide.example4.LogHandler. We give this Handler an option to let it know which file to write its messages into.
Remote Administration
WARNING: enabling remote administration may give unauthorized parties access to your machine. If you do this, please make sure to add security to your configuration!
There are four «styles» of service in Axis. RPC services use the SOAP RPC conventions, and also the SOAP «section 5» encoding. Document services do not use any encoding (so in particular, you won’t see multiref object serialization or SOAP-style arrays on the wire) but DO still do XML Java databinding. Wrapped services are just like document services, except that rather than binding the entire SOAP body into one big structure, they «unwrap» it into individual parameters. Message services receive and return arbitrary XML in the SOAP Envelope without any type mapping / data binding. If you want to work with the raw XML of the incoming and outgoing SOAP Envelopes, write a message service.
RPC services
Document / Wrapped services
Document services and wrapped services are similar in that neither uses the SOAP encoding for data; it’s just plain old XML schema. In both cases, however, Axis still «binds» Java representations to the XML (see the databinding section for more), so you end up dealing with Java objects, not directly with XML constructs.
A good place to start in describing the difference between document and wrapped services is with a sample SOAP message containing a purchase order:
The relevant schema for the PurchaseOrder looks like this:
For a document style service, this would map to a method like this:
In other words, the ENTIRE
element would be handed to your method as a single bean with three fields inside it. On the other hand, for a wrapped style service, it would map to a method like this:
Note that in the «wrapped» case, the
element is a «wrapper» (hence the name) which only serves to indicate the correct operation. The arguments to our method are what we find when we «unwrap» the outer element and take each of the inner ones as a parameter.
The document or wrapped style is indicated in WSDD as follows:
for document style
for wrapped style
In most cases you won’t need to worry about document or wrapped services if you are starting from a WSDL document (see below).
Message services
Finally, we arrive at «Message» style services, which should be used when you want Axis to step back and let your code at the actual XML instead of turning it into Java objects. There are four valid signatures for your message-style service methods:
The fourth signature passes you two SOAPEnvelope objects representing the request and response messages. This is the signature to use if you need to look at or modify headers in your service method. Whatever you put into the response envelope will automatically be sent back to the caller when you return. Note that the response envelope may already contain headers which have been inserted by other Handlers.
A sample message service can be found in samples/message/MessageService.java. The service class, MessageService, has one public method, echoElements, which matches the first of the three method signatures above:
The MsgProvider handler calls the method with an array of org.w3c.dom.Element objects that correspond to the immediate children of the incoming message’s SOAP Body. Often, this array will contain a single Element (perhaps the root element of some XML document conforming to some agreed-upon schema), but the SOAP Body can handle any number of children. The method returns an Element[] array to be returned in the SOAP body of the response message.
Message services must be deployed with a WSDD file. Here is the full WSDD for the MessageService class:
Note that the «style» attribute is different from the RPC deployment example. The «message» style tells Axis that this service is to be handled by org.apache.axis.providers.java.MsgProvider rather than org.apache.axis.providers.java.RPCProvider.
You can test this service by deploying it, then running samples.message.TestMsg (look at the source to see what the test driver does).
XML Java Data Mapping in Axis
How your Java types map to SOAP/XML types
Interoperability, interop, is an ongoing challenge between SOAP implementations. If you want your service to work with other platforms and implementations, you do need to understand the issues. There are some external articles on the subject that act as a good starting place. The basic mapping between Java types and WSDL/XSD/SOAP in Axis is determined by the JAX-RPC specification. Read chapters 4 and 5 of the specification to fully understand how things are converted. Here are some of the salient points.
Standard mappings from WSDL to Java
xsd:base64Binary | byte[] |
xsd:boolean | boolean |
xsd:byte | byte |
xsd:dateTime | java.util.Calendar |
xsd:decimal | java.math.BigDecimal |
xsd:double | double |
xsd:float | float |
xsd:hexBinary | byte[] |
xsd:int | int |
xsd:integer | java.math.BigInteger |
xsd:long | long |
xsd:QName | javax.xml.namespace.QName |
xsd:short | short |
xsd:string | java.lang.String |
If the WSDL says that an object can be nillable, that is the caller may choose to return a value of nil, then the primitive data types are replaced by their wrapper classes, such as Byte, Double, Boolean, etc.
SOAP Encoding Datatypes
Alongside the XSD datatypes are the SOAP ‘Section 5’ datatypes that are all nillable, and so only ever map to the wrapper classes. These types exist because they all support the «ID» and «HREF» attributes, and so will be used when in an RPC-encoded context to support multi-ref serialization.
Exceptions
This is an area which causes plenty of confusion, and indeed, the author of this section is not entirely sure how everything works, especially from an interop perspective. This means treat this section as incomplete and potentially inaccurate. See also section 5.5.5 and chapter 14 in the JAX-RPC specification
RemoteExceptions map to SOAP Faults
If the server method throws a java.rmi.RemoteException then this will be mapped into a SOAP Fault. The faultcode of this will contain the classname of the fault. The recipient is expected to deserialize the body of the fault against the classname.
Obviously, if the recipient does not know how to create an instance of the received fault, this mechanism does not work. Unless you include information about the exception class in the WSDL description of the service, or sender and receiver share the implementation, you can only reliably throw java.rmi.RemoteException instances, rather than subclasses.
When an implementation in another language receives such an exception, it should see the name of the class as the faultCode, but still be left to parse the body of the exception. You need to experiment to find out what happens there.
Exceptions are represented as wsdl:fault elements
If a method is marked as throwing an Exception that is not an instance or a subclass of java.rmi.RemoteException, then things are subtly different. The exception is no longer a SOAP Fault, but described as a wsdl:fault in the WSDL of the method. According to the JAX-RPC specification, your subclass of Exception must have accessor methods to access all the fields in the object to be marshalled and a constructor that takes as parameters all the same fields (i.e, arguments of the same name and type). This is a kind of immutable variant of a normal JavaBean. The fields in the object must be of the datatypes that can be reliably mapped into WSDL.
If your exception meets this specification, then the WSDL describing the method will describe the exception too, enabling callers to create stub implementations of the exception, regardless of platform.
Again, to be sure of interoperability, you need to be experiment a bit. Remember, the calling language may not have the notion of Exceptions, or at least not be as rigorous as Java in the rules as to how exceptions must be handled.
What Axis can send via SOAP with restricted Interoperability
Java Collections
What Axis can not send via SOAP
Arbitrary Objects without Pre-Registration
You cannot send arbitrary Java objects over the wire and expect them to be understood at the far end. With RMI you can send and receive Serializable Java objects, but that is because you are running Java at both ends. Axis will only send objects for which there is a registered Axis serializer. This document shows below how to use the BeanSerializer to serialize any class that follows the JavaBean pattern of accessor and mutator. To serve up objects you must either register your classes with this BeanSerializer, or there must be serialization support built in to Axis.
Remote References
Remote references are neither part of the SOAP specification, nor the JAX-RPC specification. You cannot return some object reference and expect the caller to be able to use it as an endpoint for SOAP calls or as a parameter in other calls. Instead you must use some other reference mechanism, such as storing them in a HashMap with numeric or string keys that can be passed over the wire.
Axis includes the ability to serialize/deserialize, without writing any code, arbitrary Java classes which follow the standard JavaBean pattern of get/set accessors. All you need to do is tell Axis which Java classes map to which XML Schema types. Configuring a bean mapping looks like this:
The tag maps a Java class (presumably a bean) to an XML QName. You’ll note that it has two important attributes, qname and languageSpecificType. So in this case, we’d be mapping the «my.java.thingy» class to the XML QName [someNamespace]:[local].
Let’s take a look at how this works in practice. Go look at samples/userguide/example5/BeanService.java. The key thing to notice is that the argument to the service method is an Order object. Since Order is not a basic type which Axis understands by default, trying to run this service without a type mapping will result in a fault. (If you want to try this for yourself, you can use the bad-deploy.wsdd file in the example5 directory.) But if we put a beanMapping into our deployment, all will be well. Here’s how to run this example (from the example5 directory):
Just as JWS deployment is sometimes not flexible enough to meet all needs, the default bean serialization model isn’t robust enough to handle every case either. At times there will be non-bean Java classes (especially in the case of pre-existing assets) which you need to map to/from XML, and there also may be some custom XML schema types which you want to map into Java in particular ways. Axis gives you the ability to write custom serializers/deserializers, and some tools to help make your life easier when you do so.
Now that you’ve built your serializers and deserializers, you need to tell Axis which types they should be used for. You do this with a typeMapping tag in WSDD, which looks like this:
This looks a lot like the tag we saw earlier, but there are three extra attributes. One, serializer, is the Java class name of the Serializer factory which gets the serializer to be used to marshal an object of the specified Java class (i.e., my.java.thingy) into XML. Another, deserializer, is the class name of a Deserializer factory that gets the deserializer to be used to unmarshall XML into the correct Java class. The final attribute, the encodingStyle, which is SOAP encoding.
(The tag is really just shorthand for a tag with serializer="org.apache.axis.encoding.ser.BeanSerializerFactory", deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory", and encodingStyle="http://schemas.xmlsoap.org/soap/encoding/", but clearly it can save a lot of typing!)
Another variation around typeMapping is arrayMapping. The arrayMapping tag is useful for advanced users wanting to exatly control how their arrays are serialized throught the wire.
Using WSDL with Axis
The Web Service Description Language is a specification authored by IBM and Microsoft, and supported by many other organizations. WSDL serves to describe Web Services in a structured way. A WSDL description of a service tells us, in a machine-understandable way, the interface to the service, the data types it uses, and where the service is located. Please see the spec (follow the link in the first sentence) for details about WSDL’s format and options.
Axis supports WSDL in three ways:
?WSDL: Obtaining WSDL for deployed services
When you make a service available using Axis, there is typically a unique URL associated with that service. For JWS files, that URL is simply the path to the JWS file itself. For non-JWS services, this is usually the URL «http:// /axis/services/ «.
You can also generate WSDL files from existing Java classes (see Java2WSDL: Building WSDL from Java).
WSDL2Java: Building stubs, skeletons, and data types from WSDL
Client-side bindings
You’ll find the Axis WSDL-to-Java tool in «org.apache.axis.wsdl.WSDL2Java». The basic invocation form looks like this:
This will generate only those bindings necessary for the client. Axis follows the JAX-RPC specification when generating Java client bindings from WSDL. For this discussion, assume we executed the following:
The generated files will reside in the directory «AddressFetcher2». They are put here because that is the target namespace from the WSDL and namespaces map to Java packages. Namespaces will be discussed in detail later.
WSDL clause | Java class(es) generated |
---|---|
For each entry in the type section | A java class |
A holder if this type is used as an inout/out parameter | |
For each portType | A java interface |
For each binding | A stub class |
For each service | A service interface |
A service implementation (the locator) |
There is an Ant Task to integrate this action with an Ant based build process.
Types
The Java class generated from a WSDL type will be named from the WSDL type. This class will typically, though not always, be a bean. For example, given the WSDL (the WSDL used throughout the WSDL2Java discussion is from the Address Book sample):
WSDL2Java will generate:
Mapping XML to Java types : Metadata
To support this kind of mapping, and also to enable the serialization/deserialization of XML attributes, we have a type metadata system which allows us to associate Java data classes with descriptors which control these things.
When the WSDL2Java tool creates a data bean like the Phone class above, it notices if the schema contains any attributes, or any names which do not map directly to Java field/property names. If it finds any of these things, it will generate a static piece of code to supply a type descriptor for the class. The type descriptor is essentially a collection of field descriptors, each of which maps a Java field/property to an XML element or attribute.
To see an example of this kind of metadata, look at the «test.encoding.AttributeBean» class in the Axis source, or generate your own bean from XML which uses attributes or names which would be illegal in Java.
Holders
This type may be used as an inout or out parameter. Java does not have the concept of inout/out parameters. In order to achieve this behavior, JAX-RPC specifies the use of holder classes. A holder class is simply a class that contains an instance of its type. For example, the holder for the Phone class would be:
A holder class is only generated for a type if that type is used as an inout or out parameter. Note that the holder class has the suffix «Holder» appended to the class name, and it is generated in a sub-package with the «holders».
The holder classes for the primitive types can be found in javax.xml.rpc.holders.
PortTypes
The Service Definition Interface (SDI) is the interface that’s derived from a WSDL’s portType. This is the interface you use to access the operations on the service. For example, given the WSDL:
WSDL2Java will generate:
A note about the name of the SDI. The name of the SDI is typically the name of the portType. However, to construct the SDI, WSDL2Java needs information from both the portType and the binding. (This is unfortunate and is a topic of discussion for WSDL version 2.)
Note the name of the spec. It contains the string «RPC». So this spec, and WSDL2Java, assumes that the interface generated from the portType is an RPC interface. If information from the binding tells us otherwise (in other words, we use elements of the wsdl:binding), then the name of the interface is derived instead from the binding.
Ugly, isn’t it? But you can see why it’s necessary. Since document/literal changes what the interface looks like, and we could have more than one binding referring to a single portType, we have to create more than one interface, and each interface must have a unique name.
Bindings
A Stub class implements the SDI. Its name is the binding name with the suffix «Stub». It contains the code which turns the method invocations into SOAP calls using the Axis Service and Call objects. It stands in as a proxy (another term for the same idea) for the remote service, letting you call it exactly as if it were a local object. In other words, you don’t need to deal with the endpoint URL, namespace, or parameter arrays which are involved in dynamic invocation via the Service and Call objects. The stub hides all that work for you.
Given the following WSDL snippet:
WSDL2Java will generate:
Services
Normally, a client program would not instantiate a stub directly. It would instead instantiate a service locator and call a get method which returns a stub. This locator is derived from the service clause in the WSDL. WSDL2Java generates two objects from a service clause. For example, given the WSDL:
WSDL2Java will generate the service interface:
WSDL2Java will also generate the locator which implements this interface:
The service interface defines a get method for each port listed in the service element of the WSDL. The locator is the implementation of this service interface. It implements these get methods. It serves as a locator for obtaining Stub instances. The Service class will by default make a Stub which points to the endpoint URL described in the WSDL file, but you may also specify a different URL when you ask for the PortType.
A typical usage of the stub classes would be as follows:
Server-side bindings
You will see that WSDL2Java generates all the classes that were generated before for the client, but it generates a few new files:
WSDL clause | Java class(es) generated |
---|---|
For each binding | A skeleton class |
An implementation template class | |
For all services | One deploy.wsdd file |
One undeploy.wsdd file |
If you don’t specify the «—skeletonDeploy true» option, a skeleton will not be generated. Instead, the generated deploy.wsdd will indicate that the implementation class is deployed directly. In such cases, the deploy.wsdd contains extra meta data describing the operations and parameters of the implementation class. Here is how you run WSDL2Java to deploy directly to the implementation:
And here are the server side files that are generated:
WSDL clause | Java class(es) generated |
---|---|
For each binding | An implementation template class |
For all services | One deploy.wsdd file with operation meta data |
One undeploy.wsdd file |
Bindings
Skeleton Description (for Skeleton Deployment)
The skeleton class is the class that sits between the Axis engine and the actual service implementation. Its name is the binding name with suffix «Skeleton». For example, for the AddressBook binding, WSDL2Java will generate:
(The real skeleton is actually much richer. For brevity we just show you the basic skeleton.)
The skeleton contains an implementation of the AddressBook service. This implementation is either passed into the skeleton on construction, or an instance of the generated implementation is created. When the Axis engine calls the skeleton’s addEntry method, it simply delegates the invocation to the real implementation’s addEntry method.
Implementation Template Description
WSDL2Java also generates an implementation template from the binding:
This template could actually be used as a test implementation but, as you can see, it doesn’t do anything. It is intended that the service writer fill out the implementation from this template.
Services
The tool also builds you a «deploy.wsdd» and an «undeploy.wsdd» for each service for use with the AdminClient. These files may be used to deploy the service once you’ve filled in the methods of the Implementation class, compiled the code, and made the classes available to your Axis engine.
Java2WSDL: Building WSDL from Java
The Java2WSDL and WSDL2Java emitters make it easy to develop a new web service. The following sections describe the steps in building a web service from a Java interface.
Step 1: Provide a Java interface or class
Write and compile a Java interface (or class) that describes the web service interface. Here is an example interface that describes a web services that can be used to set/query the price of widgets (samples/userguide/example6/WidgetPrice.java):
Note: If you compile your class with debug information, Java2WSDL will use the debug information to obtain the method parameter names.
Step 2: Create WSDL using Java2WSDL
Use the Java2WSDL tool to create a WSDL file from the interface above.
Here is an example invocation that produces the wsdl file (wp.wsdl) from the interface described in the previous section (entered all on one line):
The output WSDL document will contain the appropriate WSDL types, messages, portType, bindings and service descriptions to support a SOAP rpc, encoding web service. If your specified interface methods reference other classes, the Java2WSDL tool will generate the appropriate xml types to represent the classes and any nested/inherited types. The tool supports JAX-RPC complex types (bean classes), extension classes, enumeration classes, arrays and Holder classes.
The Java2WSDL tool has many additional options which are detailed in the reference guide. There is an Ant Task to integrate this action with an Ant based build process.
Step 3: Create Bindings using WSDL2Java
Use the generated WSDL file to build the appropriate client/server bindings for the web service (see WSDL2Java):
This will generate the following files:
Now you have all of the necessary files to build your client/server side code and deploy the web service!
Published Axis Interfaces
Although you may use any of the interfaces and classes present in Axis, you need to be aware that some are more stable than others since there is a continuing need to refactor Axis to maintain and improve its modularity.
Hence certain interfaces are designated as published, which means that they are relatively stable. As Axis is refactored, the Axis developers will try to avoid changing published interfaces unnecessarily and will certainly consider the impact on users of any modifications.
So if you stick to using only published interfaces, you’ll minimise the pain of migrating between releases of Axis. On the other hand, if you decide to use unpublished interfaces, migrating between releases could be an interesting exercise! If you would like an interface to be published, you should make the case for this on the axis-user mailing list.
The current list of published interfaces is as follows:
Newbie Tips: Finding Your Way Around
Places to Look for Clues
Here are the big categories.
Classes to Know
org.apache.axis.MessageContext
The answer to most «where do I find. » questions for an Axis web service is «in the MessageContext.» Essentially everything Axis knows about a given request/response can be retrieved via the MessageContext. Here Axis stores:
From within your service, the current MessageContext object is always available via the static method MessageContext.getCurrentContext(). This allows you to do any needed customization of the request and response methods, even from within an RPC service that has no explicit reference to the MessageContext.
org.apache.axis.Message
An org.apache.axis.Message object is Axis’s representation of a SOAP message. The request and response messages can be retrieved from the MessageContext as described above. A Message has:
org.apache.axis.SOAPEnvelope
As you can see, starting with the MessageContext lets you work your way down through the API, discovering all the information available to you about a single request/response exchange. A MessageContext has two Messages, which each have a SOAPPart that contains a SOAPEnvelope. The SOAPEnvelope, in turn, holds a full representation of the SOAP Envelope that is sent over the wire. From here you can get and set the contents of the SOAP Header and the SOAP Body. See the Javadocs for a full list of the properties available.
Appendix : Using the Axis TCP Monitor (tcpmon)
The included «tcpmon» utility can be found in the org.apache.axis.utils package. To run it from the command line:
Without any of the optional arguments, you will get a gui which looks like this:
To use the program, you should select a local port which tcpmon will monitor for incoming connections, a target host where it will forward such connections, and the port number on the target machine which should be «tunneled» to. Then click «add». You should then notice another tab appearing in the window for your new tunneled connection. Looking at that panel, you’ll see something like this:
Now each time a SOAP connection is made to the local port, you will see the request appear in the «Request» panel, and the response from the server in the «Response» panel. Tcpmon keeps a log of all request/response pairs, and allows you to view any particular pair by selecting an entry in the top panel. You may also remove selected entries, or all of them, or choose to save to a file for later viewing.
Appendix: Using the SOAP Monitor
Web service developers often have the need to see the SOAP messages being used to invoke web services along with the results of those messages. The goal of the SOAP Monitor utility is to provide a way for these developers to monitor the SOAP messages being used without requiring any special configuration or restarting of the server.
In this utility, a handler has been written and added to the global handler chain. As SOAP requests and responses are received, the SOAP message information is forwarded to a SOAP monitor service where it can be displayed using a web browser interface.
The SOAP message information is accessed with a web browser by going to http://localhost:
is the port number where the application server is running).
The SOAP message information is displayed through a web browser by using an applet that opens a socket connection to the SOAP monitor service. This applet requires a Java plug-in 1.3 or higher to be installed in your browser. If you do not have a correct plug-in, the browser should prompt you to install one.
The port used by the SOAP monitor service to comminicate with applets is configurable. Edit the web.xml file for the Axis web application to change the port to be used.
Note: The SOAP Monitor is NOT enabled by default for security reasons. To enable it, read Enabling the SOAP Monitor in the Installation instructions.
Appendix : Using the Standalone Soap Server
To run the standalone server from the command line:
The following options can be specified:
The following jars need to be on the classpath (as a minimum):