org.jibx.soap.client
Class SOAPClient

java.lang.Object
  extended byorg.jibx.soap.client.SOAPClient

public class SOAPClient
extends java.lang.Object

Client implementation for a document-literal web service using SOAP. This builds on the basic SOAP mapping implementation, attaching service endpoint information to allow the actual processing of requests.


Constructor Summary
SOAPClient(java.lang.String loc, org.jibx.runtime.IBindingFactory fact)
          Create client from connection information with indent specified.
SOAPClient(java.lang.String loc, org.jibx.runtime.IBindingFactory fact, int indent)
          Create client from connection information.
SOAPClient(java.net.URL url, org.jibx.runtime.IBindingFactory fact)
          Create client from connection information with indent specified.
SOAPClient(java.net.URL url, org.jibx.runtime.IBindingFactory fact, int indent)
          Create client from connection information.
 
Method Summary
 java.lang.Object call(java.lang.Object request)
          Call the service with empty action.
 java.lang.Object call(java.lang.Object request, java.lang.String action)
          Call the service with specified action.
 SOAPContext getContext()
          Get SOAP context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SOAPClient

public SOAPClient(java.net.URL url,
                  org.jibx.runtime.IBindingFactory fact,
                  int indent)
           throws org.jibx.runtime.JiBXException
Create client from connection information.

Parameters:
url - location for service access
fact - binding factory for converting bodies to and from objects
indent - number of spaces to indent for marshalling output
Throws:
org.jibx.runtime.JiBXException - on error in initializing binding information

SOAPClient

public SOAPClient(java.lang.String loc,
                  org.jibx.runtime.IBindingFactory fact,
                  int indent)
           throws java.net.MalformedURLException,
                  org.jibx.runtime.JiBXException
Create client from connection information.

Parameters:
loc - location for service access
fact - binding factory for converting bodies to and from objects
indent - number of spaces to indent for marshalling output
Throws:
java.net.MalformedURLException - if the location is not a valid URL
org.jibx.runtime.JiBXException - on error in initializing binding information

SOAPClient

public SOAPClient(java.net.URL url,
                  org.jibx.runtime.IBindingFactory fact)
           throws org.jibx.runtime.JiBXException
Create client from connection information with indent specified.

Parameters:
url - location for service access
fact - binding factory for converting bodies to and from objects
Throws:
org.jibx.runtime.JiBXException - on error in initializing binding information

SOAPClient

public SOAPClient(java.lang.String loc,
                  org.jibx.runtime.IBindingFactory fact)
           throws java.net.MalformedURLException,
                  org.jibx.runtime.JiBXException
Create client from connection information with indent specified.

Parameters:
loc - location for service access
fact - binding factory for converting bodies to and from objects
Throws:
java.net.MalformedURLException - if the location is not a valid URL
org.jibx.runtime.JiBXException - on error in initializing binding information
Method Detail

getContext

public SOAPContext getContext()
Get SOAP context. This allows direct access to the SOAP context to allow the client application to set handlers, add transmit headers, and view receive headers.

Returns:
SOAP context

call

public java.lang.Object call(java.lang.Object request,
                             java.lang.String action)
                      throws java.io.IOException,
                             SOAPException
Call the service with specified action. This form of the call allows access to servers which require an action to be specified as part of the HTTP headers.

Parameters:
request - object to be marshalled to XML as body of request (may be null, for an empty request body)
action - SOAPAction code for request
Returns:
response object unmarshalled from body of response (may be null, for an empty response body, or an instance of SOAPFault for a fault return)
Throws:
java.io.IOException - on error in communicating with service (including returned Fault)
SOAPException - on error in SOAP request processing

call

public java.lang.Object call(java.lang.Object request)
                      throws java.io.IOException,
                             SOAPException
Call the service with empty action. Since this is designed for use with document/literal web services the element type of the marshalled request object is expected to identify the actual operation to be performed.

Parameters:
request - object to be marshalled to XML as body of request (may be null, for an empty request body)
Returns:
response object unmarshalled from body of response (may be null, for an empty response body, or an instance of SOAPFault for a fault return)
Throws:
java.io.IOException - on error in communicating with service (including returned Fault)
SOAPException - on error in SOAP request processing


Project Web Site