|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.wingfoot.soap.transport.J2SEHTTPTransport
Class to aid in making SOAP calls over HTTP using J2SE.
Constructor Summary | |
J2SEHTTPTransport(java.lang.String url,
java.lang.String soapAction)
Creates an instance of HTTPTransport with the url and port number specified. |
Method Summary | |
void |
addHeader(java.lang.String name,
java.lang.String value)
Method to specify HTTP Header(s). |
byte[] |
call(byte[] payload)
Makes a HTTP connection the the URL and port specified. |
void |
getResponse(boolean shouldGetResponse)
Method to specify if the HTTP call should wait for a response from the service. |
void |
setSOAPAction(java.lang.String soapAction)
Provides the ability to set the soapAction. |
void |
useSession(boolean usage,
java.lang.String cookieName)
Identifies if the session has to be maintained. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public J2SEHTTPTransport(java.lang.String url, java.lang.String soapAction)
url
- the URL to connect to.SOAPAction
- the value for SOAPAction HTTP header.
If null, the header is set to "".Method Detail |
public void useSession(boolean usage, java.lang.String cookieName)
usage
- boolean that identifies if a session has
to be maintained; true indicates that the cookie
sent back by the server is sent back to the server
thereby maintaining state; false indicates the cookie
is not sent back; default is falsecookieName
- the name of the cookie that is used
to maintain the state; if null JSESSIONID is used.public void addHeader(java.lang.String name, java.lang.String value) throws SOAPException
name
- the name of the HTTP header; cannot be nullvalue
- the value of the header; cannot be nullSOAPException
- if the key or value is nullpublic void getResponse(boolean shouldGetResponse)
Please use this option with care. It has been noticed that a connection is not made to the server until explicitly opening an InputStream to the server; hence setting the boolean to false will not parse the data but the call is blocked until the server responds.
shouldGetResponse
- true if a response is to
be retrieved (default); false if response is not
to be retrieved.public byte[] call(byte[] payload) throws SOAPException, java.io.IOException, java.net.MalformedURLException
call
in interface Transport
payload
- the SOAP message as a byte array.java.io.IOException
- if any error occurs during connection
to the server.SOAPException
- if the response is not XML.public void setSOAPAction(java.lang.String soapAction)
soapAction
- the new soapAction.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
KXML is a XML parser by Lutris Technologies