Name

ProviderConnection

Synopsis

public interface ProviderConnection {
// Public Instance Methods
    public abstract void close(  ) throws JAXMException; 
    public abstract javax.xml.soap.MessageFactory createMessageFactory(String profile) throws JAXMException; 
    public abstract ProviderMetaData getMetaData( ) throws JAXMException;
    public abstract void send(javax.xml.soap.SOAPMessage message) throws JAXMException;
}

A ProviderConnection object represents a connection path between a JAXM client and a JAXM provider. An instance of this class can be obtained using the createConnection( ) method of ProviderConnectionFactory, as described in the reference section for that class. Here’s a typical example:

ProviderConnectionFactory pcf = ProviderConnectionFactory.newInstance(  );
ProviderConnection conn = pcf.createConnection(  );

All JAXM clients work with a JAXM message profile, which constructs SOAP messages according to agreed rules. A JAXM client can use the getMetaData( ) method to obtain a ProviderMetaData object that can be used to get the names of the profiles that the provider supports. In practice, however, a JAXM client has to be written with knowledge of the classes that implement a particular profile; therefore, this mechanism will probably only be used to verify that the required profile is available.

The createMessageFactory( ) method returns an object that can create messages formed according to the rules of the profile whose name is provided as its argument. The set of profiles supported ...

Get Java Web Services in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.