/*
- * Copyright 2001-2006 Internet2
+ * Copyright 2001-2007 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
namespace soap11 {
class XMLTOOL_API Envelope;
+ class XMLTOOL_API Fault;
/**
* Implements SOAP 1.1 messaging over a transport.
{
MAKE_NONCOPYABLE(SOAPClient);
public:
+ /**
+ * Constructor
+ *
+ * @param validate true iff schema validation should be used
+ */
SOAPClient(bool validate=false) : m_validate(validate), m_transport(NULL) {}
+
virtual ~SOAPClient();
/**
* @param peer peer to send message to, expressed in TrustEngine terms
* @param endpoint URL of endpoint to recieve message
*/
- virtual void send(const Envelope* env, const xmltooling::KeyInfoSource& peer, const char* endpoint);
+ virtual void send(const Envelope& env, const xmltooling::KeyInfoSource& peer, const char* endpoint);
/**
* Returns the response message, if any. As long as a response is
* will be forthcoming, an exception is raised.
*
* <p>The caller is responsible for freeing the returned envelope.
- *
- * <p>Once a response is returned, the object will be reset for a subsequent call.
*/
virtual Envelope* receive();
*
* @param transport reference to transport layer
*/
- virtual void prepareTransport(const xmltooling::SOAPTransport& transport) {}
-
+ virtual void prepareTransport(xmltooling::SOAPTransport& transport) {}
+
+ /**
+ * Handling of SOAP faults.
+ *
+ * @param fault SOAP Fault received by client
+ * @return true iff the Fault should be treated as a fatal error
+ */
+ virtual bool handleFault(const soap11::Fault& fault);
+
/** Flag controlling schema validation. */
bool m_validate;