org.apache.soap.rpc
Class Response

java.lang.Object
  |
  +--org.apache.soap.rpc.RPCMessage
        |
        +--org.apache.soap.rpc.Response

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)

Fields inherited from class org.apache.soap.rpc.RPCMessage
ctx, encodingStyleURI, fullTargetObjectURI, header, methodName, params, targetObjectURI
 
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.
 
Method Summary
 Envelope buildEnvelope()
           
static Response extractFromEnvelope(Envelope env, SOAPMappingRegistry smr, SOAPContext ctx)
           
 javax.mail.BodyPart findBodyPart(java.lang.String uri)
          Find the Mimepart referred to by the given URI.
 boolean generatedFault()
           
 javax.mail.BodyPart getBodyPart(int index)
          Get the specified Part by its index.
 Fault getFault()
           
 int getPartCount()
          Return the number of enclosed BodyPart objects.
 Parameter getReturnValue()
           
 void setFault(Fault fault)
           
 void setReturnValue(Parameter returnValue)
           
 
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
 

Constructor Detail

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.
Method Detail

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: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 Apache XML Project. All Rights Reserved.