Methods Summary |
---|
public javax.xml.soap.SOAPMessage | call(javax.xml.soap.SOAPMessage request, java.lang.Object endpoint)Sends the given message to the specified endpoint and
blocks until it has returned the response.
if(closed){
throw new SOAPException(Messages.getMessage("connectionClosed00"));
}
try {
Call call = new Call(endpoint.toString());
((org.apache.axis.Message)request).setMessageContext(call.getMessageContext());
Attachments attachments = ((org.apache.axis.Message)
request).getAttachmentsImpl();
if (attachments != null) {
Iterator iterator = attachments.getAttachments().iterator();
while (iterator.hasNext()) {
Object attachment = iterator.next();
call.addAttachmentPart(attachment);
}
}
String soapActionURI = checkForSOAPActionHeader(request);
if (soapActionURI != null)
call.setSOAPActionURI(soapActionURI);
call.setTimeout(timeout);
call.setReturnClass(SOAPMessage.class);
call.setProperty(Call.CHECK_MUST_UNDERSTAND,Boolean.FALSE);
call.invoke((Message) request);
return call.getResponseMessage();
} catch (java.net.MalformedURLException mue){
throw new SOAPException(mue);
} catch (org.apache.axis.AxisFault af){
return new Message(af);
}
|
private java.lang.String | checkForSOAPActionHeader(javax.xml.soap.SOAPMessage request)Checks whether the request has an associated SOAPAction MIME header
and returns its value.
MimeHeaders hdrs = request.getMimeHeaders();
if (hdrs != null) {
String[] saHdrs = hdrs.getHeader("SOAPAction");
if (saHdrs != null && saHdrs.length > 0)
return saHdrs[0];
}
return null;
|
public void | close()Closes this SOAPConnection object.
if(closed){
throw new SOAPException(Messages.getMessage("connectionClosed00"));
}
closed = true;
|
public java.lang.Integer | getTimeout()get the timeout value
return timeout;
|
public void | setTimeout(java.lang.Integer timeout)set the timeout value
this.timeout = timeout;
|