Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle® Application Server XML Java API Reference 10g Release 2 (10.1.2) Part no. B12024-03 September 2004
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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.

Field Summary

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)`
`BodyPart` | `findBodyPart(java.lang.String uri)` Find the Mimepart referred to by the given URI.
`boolean` | `generatedFault()`
`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

    `java.lang.IllegalArgumentException`

### findBodyPart

    public 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 MessagingException

  Return the number of enclosed BodyPart objects.
  Returns:
    number of parts
  Throws:
    `MessagingException`

### getBodyPart

    public 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

Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle® Application Server XML Java API Reference 10g Release 2 (10.1.2) Part no. B12024-03 September 2004
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001 The Apache Software Foundation. All rights reserved.