|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.muse.ws.addressing.soap.SimpleSoapClient
SimpleSoapClient is and implementation of SoapClient that relies on the java.net.HttpURLConnection API to send and receive SOAP messages. It provides complete WS-Addressing (WS-A) support, so that all requests are routed with WS-A EPRs and Actions. Messages are sent with valid reply and fault EPRs so that responses can be redirected if desired.
| Constructor Summary | |
|---|---|
SimpleSoapClient()
|
|
| Method Summary | |
|---|---|
protected org.w3c.dom.Element |
createMessage(EndpointReference source,
EndpointReference destination,
java.lang.String action,
org.w3c.dom.Element[] bodyElements,
org.w3c.dom.Element[] extraHeaders)
Creates a valid SOAP message, including WS-A headers that specify the destination and operation (action). |
protected java.net.URL |
getDestinationURL(EndpointReference destination)
|
int |
getSoapMonitorPort()
|
java.io.PrintWriter |
getTraceWriter()
|
boolean |
isUsingSoapMonitor()
The default value is 'false'. |
boolean |
isUsingTrace()
{@inheritDoc} The default value is 'false'. |
org.w3c.dom.Element[] |
send(EndpointReference src,
EndpointReference dest,
java.lang.String wsaAction,
org.w3c.dom.Element[] body)
Sends a SOAP envelope with the given body to the given destination. |
org.w3c.dom.Element[] |
send(EndpointReference src,
EndpointReference dest,
java.lang.String wsaAction,
org.w3c.dom.Element[] body,
org.w3c.dom.Element[] extraHeaders)
Sends a SOAP envelope with the given body to the given destination. |
void |
setTrace(boolean trace)
|
void |
setTraceWriter(java.io.PrintWriter writer)
{@inheritDoc} Note that there is a default PrintWriter set at instantiation - it wraps the System.out stream. |
void |
startSoapMonitor(int monitorPort)
Causes the SoapClient to send messages to the given port. |
void |
stopSoapMonitor()
If SOAP monitoring was in use, the client will revert back to sending the messages to the port in the EPR's wsa:Address. |
protected void |
trace(org.w3c.dom.Element xml,
boolean incoming)
|
protected void |
trace(java.lang.String message)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SimpleSoapClient()
| Method Detail |
protected org.w3c.dom.Element createMessage(EndpointReference source,
EndpointReference destination,
java.lang.String action,
org.w3c.dom.Element[] bodyElements,
org.w3c.dom.Element[] extraHeaders)
source - destination - action - bodyElements - extraHeaders -
protected java.net.URL getDestinationURL(EndpointReference destination)
destination -
public int getSoapMonitorPort()
getSoapMonitorPort in interface SoapMonitorpublic java.io.PrintWriter getTraceWriter()
public boolean isUsingSoapMonitor()
isUsingSoapMonitor in interface SoapMonitorpublic boolean isUsingTrace()
public org.w3c.dom.Element[] send(EndpointReference src,
EndpointReference dest,
java.lang.String wsaAction,
org.w3c.dom.Element[] body)
SoapClient
send in interface SoapClientsrc - The EPR of the service sending the message.dest - The EPR of the service that will receive the message.wsaAction - The WS-A Action that specifies the operation to be invoked on
the destination service.body - The contents of the SOAP body.
public org.w3c.dom.Element[] send(EndpointReference src,
EndpointReference dest,
java.lang.String wsaAction,
org.w3c.dom.Element[] body,
org.w3c.dom.Element[] extraHeaders)
SoapClient
send in interface SoapClientsrc - The EPR of the service sending the message.dest - The EPR of the service that will receive the message.wsaAction - The WS-A Action that specifies the operation to be invoked on
the destination service.body - The contents of the SOAP body.extraHeaders - SOAP header elements that should be added to the outgoing message.
These headers must not use the WS-Addressing namespace.
public void setTrace(boolean trace)
public void setTraceWriter(java.io.PrintWriter writer)
public void startSoapMonitor(int monitorPort)
SoapMonitor
startSoapMonitor in interface SoapMonitormonitorPort - A positive integer - 0 to 65535.public void stopSoapMonitor()
SoapMonitor
stopSoapMonitor in interface SoapMonitor
protected void trace(org.w3c.dom.Element xml,
boolean incoming)
xml - An XML fragment that will be sent to the trace log.incoming - True if the message was part of an incoming SOAP message. This
merely provides some context in the trace log.protected void trace(java.lang.String message)
message - The message to print to the trace log.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||