ucar.ncx.soap
Class NcxSoapMessageRequestFactory

java.lang.Object
  |
  +--ucar.ncx.soap.NcxSoapMessageRequestFactory

public class NcxSoapMessageRequestFactory
extends java.lang.Object

Utility class used to build (client side) or process (server side) a SOAP Envelope containing the XML-encoded request for netcdf to xml transformation. The xml request message has the form:

<ncx xmlns="urn:ncx-message" url="........" flag="....."/>
and it is wrapped within the SOAP envelope. This class has methods for both Apache-SOAP and JAXM APIs.


Constructor Summary
NcxSoapMessageRequestFactory()
          No argument constructor
 
Method Summary
 org.apache.soap.Envelope buildEnvelope(java.lang.String netcdfURL, boolean flag)
          Method to build a SOAP Envelope (as an Apache-SOAP Envelope object) containing the XML-encoded request information
 javax.xml.soap.SOAPMessage buildSOAPMessage(java.lang.String netcdfURL, boolean flag)
          Method to build a SOAP Message (as a JAXM SOAPMessage object) containing the XML-encoded request information
 boolean getFlag()
          Method to access the flag value extracted from the request SOAP message.
 java.lang.String getURL()
          Method to access the url value extracted from the request SOAP message.
 void processEnvelope(org.apache.soap.Envelope requestEnvelope)
          Method to process an incoming SOAP envelope (as an Apache-SOAP Envelope object) containig a netcdf to xml transformation request.
 void processSOAPMessage(javax.xml.soap.SOAPMessage message)
          Method to process an incoming SOAP message (as a JAXM SOAPMessage object) containig a netcdf to xml transformation request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NcxSoapMessageRequestFactory

public NcxSoapMessageRequestFactory()
No argument constructor

Method Detail

buildEnvelope

public org.apache.soap.Envelope buildEnvelope(java.lang.String netcdfURL,
                                              boolean flag)
                                       throws org.xml.sax.SAXException,
                                              java.io.IOException
Method to build a SOAP Envelope (as an Apache-SOAP Envelope object) containing the XML-encoded request information

Parameters:
netcdfURL - URL of netcdf file to be processed
flag - flag set to false to use only generic netcdf schema (http://www.ucar.edu/schemas/netcdf), or true to use specific netcdf schemas as identified by the global attribute "conventions" in the netcdf file
org.xml.sax.SAXException
java.io.IOException

buildSOAPMessage

public javax.xml.soap.SOAPMessage buildSOAPMessage(java.lang.String netcdfURL,
                                                   boolean flag)
                                            throws javax.xml.soap.SOAPException
Method to build a SOAP Message (as a JAXM SOAPMessage object) containing the XML-encoded request information

Parameters:
netcdfURL - URL of netcdf file to be processed
flag - flag set to false to use only generic netcdf schema (http://www.ucar.edu/schemas/netcdf), or true to use specific netcdf schemas as identified by the global attribute "conventions" in the netcdf file
javax.xml.soap.SOAPException

processEnvelope

public void processEnvelope(org.apache.soap.Envelope requestEnvelope)
Method to process an incoming SOAP envelope (as an Apache-SOAP Envelope object) containig a netcdf to xml transformation request. The values extracted from the input message are used to instantiate the object properties, and retrieved through access methods.

Parameters:
requestEnvelope - the Apache-SOAP Envelope containing the request parameters

processSOAPMessage

public void processSOAPMessage(javax.xml.soap.SOAPMessage message)
                        throws javax.xml.soap.SOAPException
Method to process an incoming SOAP message (as a JAXM SOAPMessage object) containig a netcdf to xml transformation request. The values extracted from the input message are used to instantiate the object properties, and retrieved through access methods.

Parameters:
message - the JAXM incoming message containing the request parameters
javax.xml.soap.SOAPException

getURL

public java.lang.String getURL()
Method to access the url value extracted from the request SOAP message.

Returns:
the URL of the netcdf file to be processed

getFlag

public boolean getFlag()
Method to access the flag value extracted from the request SOAP message.

Returns:
the flag indicating wether or not specific netcdf schemas should be used