org.apache.soap.rpc
Class Response
java.lang.Object
|
+--org.apache.soap.rpc.RPCMessage
|
+--org.apache.soap.rpc.Response
- All Implemented Interfaces:
- Serializer
- public class Response
- extends RPCMessage
A Response
object represents an RPC response. Both
the client and the server use Response
objects to represent
the result of a method invocation.
- Author:
- Matthew J. Duftler (duftler@us.ibm.com), Sanjiva Weerawarana (sanjiva@watson.ibm.com)
Constructor Summary |
Response(java.lang.String targetObjectURI,
java.lang.String methodName,
Fault fault,
java.util.Vector params,
Header header,
java.lang.String encodingStyleURI,
SOAPContext ctx)
Use this constructor when things didn't go so well. |
Response(java.lang.String targetObjectURI,
java.lang.String methodName,
Parameter returnValue,
java.util.Vector params,
Header header,
java.lang.String encodingStyleURI,
SOAPContext ctx)
Use this constructor when everything went well. |
Methods inherited from class org.apache.soap.rpc.RPCMessage |
buildEnvelope, extractFromEnvelope, getEncodingStyleURI, getFullTargetObjectURI,
getHeader, getMethodName, getParams,
getSOAPContext, getTargetObjectURI, marshall, setEncodingStyleURI,
setFullTargetObjectURI, setHeader, setMethodName,
setParams, setSOAPContext, setTargetObjectURI,
toString, unmarshall |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Response
public Response(java.lang.String targetObjectURI,
java.lang.String methodName,
Parameter returnValue,
java.util.Vector params,
Header header,
java.lang.String encodingStyleURI,
SOAPContext ctx)
- Use this constructor when everything went well.
Response
public Response(java.lang.String targetObjectURI,
java.lang.String methodName,
Fault fault,
java.util.Vector params,
Header header,
java.lang.String encodingStyleURI,
SOAPContext ctx)
- Use this constructor when things didn't go so well.
setReturnValue
public void setReturnValue(Parameter returnValue)
getReturnValue
public Parameter getReturnValue()
setFault
public void setFault(Fault fault)
getFault
public Fault getFault()
generatedFault
public boolean generatedFault()
buildEnvelope
public Envelope buildEnvelope()
extractFromEnvelope
public static Response extractFromEnvelope(Envelope env,
SOAPMappingRegistry smr,
SOAPContext ctx)
throws java.lang.IllegalArgumentException
findBodyPart
public javax.mail.BodyPart findBodyPart(java.lang.String uri)
- Find the Mimepart referred to by the given URI. This can be:
- An absolute URI, in which case a part is located with a
corresponding Content-Location header.
- A relative URI, in which case an absolute URI is constructed
relative to the Content-Location header of the root SOAP part
or the multipart and the previous rule is then applied.
- A URI of the format "cid:xxx"> in which case a part is located
with a matching Content-ID header.
Returns null if the part is not found.
Note: relative URIs not entirely implemented yet.
- Parameters:
uri
- the URI- Returns:
- the Part or null if not found
getPartCount
public int getPartCount()
throws javax.mail.MessagingException
- Return the number of enclosed BodyPart objects.
- Returns:
- number of parts
- Throws:
javax.mail.MessagingException
-
getBodyPart
public javax.mail.BodyPart getBodyPart(int index)
throws java.lang.IndexOutOfBoundsException
- Get the specified Part by its index. Parts are numbered starting at 0.
- Parameters:
index
- the index of the desired Part- Returns:
- the Part
- Throws:
java.lang.IndexOutOfBoundsException
- if no such Part exists
Copyright © 2001 Oracle SOAP. All Rights Reserved.