public class

BatchResponse

extends DataObject
java.lang.Object
   ↳ org.mule.modules.oracle.model.AbstractDataObject
     ↳ com.oracle.xmlns.svc.DataObject
       ↳ com.oracle.xmlns.svc.BatchResponse

Class Overview

A bundle of method invocation responses returned from a Service Service.

A code example for using BatchResponse:

  List methodResponses = batchResponse.getMethodResponse();
  if(methodResponses != null & methodResponses.size() > 0)
  {
    Iterator respIter = methodResponses.iterator();
    while(respIter.hasNext())
    {
      MethodResponse methodResponse = (MethodResponse)respIter.next();
      System.out.println("Response "+methodResponse.getRequestName());
      Object ret = methodResponse.getReturn();
      if(ret != null)
      {
        if(ret instanceof java.util.List)
        {
          List l = (java.util.List)ret;
          for ( int i=0; i< l.size(); i++ )
          {
            Object obj = l.get(i);
            System.out.println("Return obj:"+(i+1)+": "+obj);
          }
        }
        else
        {
          System.out.println("Return obj:"+ret);
        }  
      }
      
      //Informational messages coming from the method invocation
      List mesgs = methodResponse.getMessage();
      if(mesgs != null & mesgs.size() > 0)
      {
        for(int i=0; i < mesgs.size(); i++)
        {
          System.out.println("Message #"+(i+1)+": "+mesgs.get(i).toString());
        }
      }
      //Error messages coming from the method invocation
      List errors = methodResponse.getErrorMessage();
      if(errors != null & errors.size() > 0)
      {
        for(int i=0; i < errors.size(); i++)
        {
          System.out.println("Error Message #"+(i+1)+": "+errors.get(i).toString());
        }
      }
    }
  }
  
  //Informational messages coming from the batch
  List serviceMessages = batchResponse.getMessage();
  if(serviceMessages != null & serviceMessages.size() > 0)
  {
    System.out.println("Service Messages:");
    for(int i=0; i < serviceMessages.size(); i++)
    {
      System.out.println("Message "+(i+1)+": "+serviceMessages.get(i).toString());
    }
  }
  //Errors coming from the batch
  List serviceErrors = batchResponse.getErrorMessage();
  if(serviceErrors != null & serviceErrors.size() > 0)
  {
    System.out.println("Error Messages:");
    for(int i=0; i < serviceErrors.size(); i++)
    {
      System.out.println("Error Message "+(i+1)+": "+serviceErrors.get(i).toString());
    }
  }
 

See Also
  • BatchRequest
  • MethodResponse
  • Service

    Java class for BatchResponse complex type.

    The following schema fragment specifies the expected content contained within this class.

     <complexType name="BatchResponse">
       <complexContent>
         <extension base="{http://xmlns.oracle.com/svc}DataObject">
           <sequence>
             <element name="MethodResponse" type="{http://xmlns.oracle.com/svc}MethodResponse" maxOccurs="unbounded" minOccurs="0"/>
             <element name="Message" type="{http://xmlns.oracle.com/svc}ServiceMessage" maxOccurs="unbounded" minOccurs="0"/>
             <element name="ErrorMessage" type="{http://xmlns.oracle.com/svc}ServiceMessage" maxOccurs="unbounded" minOccurs="0"/>
           </sequence>
         </extension>
       </complexContent>
     </complexType>
     

Summary

Fields
protected List<ServiceMessage> errorMessage
protected List<ServiceMessage> message
protected List<MethodResponse> methodResponse
Public Constructors
BatchResponse()
Public Methods
List<ServiceMessage> getErrorMessage()
Gets the value of the errorMessage property.
List<ServiceMessage> getMessage()
Gets the value of the message property.
List<MethodResponse> getMethodResponse()
Gets the value of the methodResponse property.
void setErrorMessage(List<ServiceMessage> errorMessage)
Sets the value of the errorMessage property.
void setMessage(List<ServiceMessage> message)
Sets the value of the message property.
void setMethodResponse(List<MethodResponse> methodResponse)
Sets the value of the methodResponse property.
[Expand]
Inherited Methods
From class org.mule.modules.oracle.model.AbstractDataObject
From class java.lang.Object

Fields

protected List<ServiceMessage> errorMessage

protected List<ServiceMessage> message

protected List<MethodResponse> methodResponse

Public Constructors

public BatchResponse ()

Public Methods

public List<ServiceMessage> getErrorMessage ()

Gets the value of the errorMessage property.

This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a set method for the errorMessage property.

For example, to add a new item, do as follows:

    getErrorMessage().add(newItem);
 

Objects of the following type(s) are allowed in the list ServiceMessage

Returns
  • The errorMessage property.

public List<ServiceMessage> getMessage ()

Gets the value of the message property.

This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a set method for the message property.

For example, to add a new item, do as follows:

    getMessage().add(newItem);
 

Objects of the following type(s) are allowed in the list ServiceMessage

public List<MethodResponse> getMethodResponse ()

Gets the value of the methodResponse property.

This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a set method for the methodResponse property.

For example, to add a new item, do as follows:

    getMethodResponse().add(newItem);
 

Objects of the following type(s) are allowed in the list MethodResponse

public void setErrorMessage (List<ServiceMessage> errorMessage)

Sets the value of the errorMessage property.

Parameters
errorMessage Allowed object is ServiceMessage

public void setMessage (List<ServiceMessage> message)

Sets the value of the message property.

Parameters
message Allowed object is ServiceMessage

public void setMethodResponse (List<MethodResponse> methodResponse)

Sets the value of the methodResponse property.

Parameters
methodResponse Allowed object is MethodResponse