public class SoapClient extends Object
setEchoStream(java.io.OutputStream)
method.
Probably, there is much of SOAP that this doesn't implement, but
it works well enough to write a registry client on top of it.
Why write yet another SOAP client? Last time I tried to get Axis to do this (stream processing of the response) it took me several days of misery, and still didn't work. The actual job I need to do here is quite straightforward, so it's not difficult to write it from scratch.
Constructor and Description |
---|
SoapClient(URL endpoint)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
execute(SoapRequest request,
ContentHandler responseBodyHandler)
Sends a SOAP request, and passes the response body to a supplied
SAX content handler.
|
URL |
getEndpoint()
Returns the endpoint of the service this client talks to.
|
void |
setEchoStream(OutputStream echoStream)
Sets an output stream to which all input and output HTTP
traffic will be logged.
|
public SoapClient(URL endpoint)
endpoint
- SOAP endpoint of servicepublic URL getEndpoint()
public void setEchoStream(OutputStream echoStream)
echoStream
- logging destination streampublic void execute(SoapRequest request, ContentHandler responseBodyHandler) throws IOException, SAXException
request
- SOAP request to sendresponseBodyHandler
- a SAX ContentHandler which will be
invoked on the content of the <soapenv:Body>
response element in case of a successful (200) responseIOException
SAXException
Copyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.