java.lang.Object | |||
↳ | org.mule.modules.oracle.model.AbstractDataObject | ||
↳ | com.oracle.xmlns.svc.DataObject | ||
↳ | com.oracle.xmlns.svc.BatchResponse |
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());
}
}
BatchRequest
MethodResponse
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>
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
errorMessage | |||||||||||
message | |||||||||||
methodResponse |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Gets the value of the errorMessage property.
| |||||||||||
Gets the value of the message property.
| |||||||||||
Gets the value of the methodResponse property.
| |||||||||||
Sets the value of the errorMessage property.
| |||||||||||
Sets the value of the message property.
| |||||||||||
Sets the value of the methodResponse property.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.mule.modules.oracle.model.AbstractDataObject
| |||||||||||
From class
java.lang.Object
|
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
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
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
Sets the value of the errorMessage property.
errorMessage | Allowed object is
ServiceMessage
|
---|
Sets the value of the message property.
message | Allowed object is
ServiceMessage
|
---|
Sets the value of the methodResponse property.
methodResponse | Allowed object is
MethodResponse
|
---|