|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.wingfoot.soap.SOAPElement | +--com.wingfoot.soap.Envelope
Encapsulates the SOAP Envelope element.
Constructor Summary | |
Envelope()
Constructor for the SOAP Envelope. |
Method Summary | |
void |
addHeader(HeaderEntry headerEntry)
Adds a SOAP HeaderEntry |
void |
deserialize(byte[] response,
TypeMappingRegistry registry)
Takes the response from the service as a byte[] and converts it into Java representation |
java.lang.String |
getBody()
Returns the SOAP Body. |
java.lang.String |
getEncoding()
Utility method to retrieve the encoding (example UTF-8) specified using useEncoding method. |
java.lang.String |
getEncodingStyle()
Convenience method to get the encodingStyle SOAP attribute. |
Fault |
getFault()
Returns the fault generated by the service encapsulated as Fault |
java.util.Vector |
getHeader()
Returns the SOAP Headers |
java.lang.Object |
getParameter(int index)
Returns the parameter at the given index. |
int |
getParameterCount()
Returns the number of parameters in the the SOAP Body. |
java.lang.String |
getParameterName(int index)
Returns the parameter name at the given index. |
java.lang.String |
getReturnNamespace()
Returns the namespace associated with the return operation. |
java.lang.String |
getReturnOperationName()
For RPC style response, the parameter is wrapped with an element. |
java.lang.String |
getSchema()
Convenience method to get the Schema |
java.lang.String |
getSchemaInstance()
Convenience method to get the Schema Instance |
boolean |
isDocumentStyle()
Determines if the envelope contains Document style or RPC style parameters. |
boolean |
isFaultGenerated()
Determines if a fault element was present in the response from a service. |
byte[] |
serialize(TypeMappingRegistry registry,
java.lang.String methodName,
java.lang.String targetURI)
Takes the Envelope (along with the header and body) and converts it to XML that is SOAP message compliant. |
void |
setBody(java.lang.String body)
Sets the SOAP body with arbitary XML payload. |
void |
setBody(java.lang.String parameterName,
java.lang.Object value)
Sets the SOAP body with parameters. |
void |
setEncodingStyle(java.lang.String encodingStyle)
Helper method for setting the encodingStyle SOAP attribute. |
void |
setSchema(java.lang.String schema)
Helper method for setting the schema attribute |
void |
setSchemaInstance(java.lang.String schemaInstance)
Helper method for setting the schemaInstance attribute |
void |
useEncoding(java.lang.String enc)
Method to specify the encoding to use while sending and parsing the SOAP payload (example UTF-8). |
Methods inherited from class com.wingfoot.soap.SOAPElement |
addAttribute, deserialize, getAttribute, getAttributes, removeAttribute, serialize |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Envelope()
envelope.removeAttribute ()
followed by envelope.setSchema/SchemaInstance/EncodingStyle()
.Method Detail |
public void addHeader(HeaderEntry headerEntry)
headerEntry
- Instance of HeaderEntry which
encapsulates an instance of a header.public void setBody(java.lang.String parameterName, java.lang.Object value) throws SOAPException
parameterName
- String with the name of the
parameter.value
- Object encapsulating the value assigned
to the parameter. In Bubbles, all primitive data
types are represented as their corresponding wrapper
classSOAPException
- if a Document Style parameter
was previously added.public void setBody(java.lang.String body) throws SOAPException
body
- String representing the XML as soap payloadSOAPException
- if a RPC style parameter was already
specified in this envelopepublic void setSchemaInstance(java.lang.String schemaInstance)
schemaInstance
- URI of Schema Instancepublic void setSchema(java.lang.String schema)
schema
- URI of Schemapublic void setEncodingStyle(java.lang.String encodingStyle)
schema
- URI of encodingStylepublic java.util.Vector getHeader()
public boolean isDocumentStyle()
public java.lang.String getBody()
public int getParameterCount()
public java.lang.String getParameterName(int index)
index
- the parameter number.
return String with the parameter name.public java.lang.Object getParameter(int index)
index
- the parameter number.public boolean isFaultGenerated()
public Fault getFault()
public java.lang.String getSchemaInstance()
public java.lang.String getSchema()
public java.lang.String getEncodingStyle()
public void useEncoding(java.lang.String enc)
enc
- the encoding to use.public java.lang.String getEncoding()
public byte[] serialize(TypeMappingRegistry registry, java.lang.String methodName, java.lang.String targetURI) throws java.lang.Exception
registry
- instance of TypeMappingRegistry mapping
each custom class to serialize/deserialize to a namespace
and the serializer and deserializer class.methodName
- the name of the method to invoke on the
on the servicetargetURI
- URI of the service to invokejava.lang.Exception
- if problems during serializationpublic void deserialize(byte[] response, TypeMappingRegistry registry) throws java.io.IOException, SOAPException, java.lang.Exception
response
- the response from the serviceregistry
- instance of TypeMappingRegistry mapping
each custom class to serialize/deserialize to a namespace
and the serializer and deserializer class.java.io.IOException
- if any error occurs in parsing the
payload returned.SOAPException
- if any error occurs during
deserializationjava.lang.Exception
- any other unusual exceptions.public java.lang.String getReturnOperationName()
public java.lang.String getReturnNamespace()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
KXML is a XML parser by Lutris Technologies