You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by sa...@apache.org on 2004/04/09 08:44:07 UTC
cvs commit: ws-axis/c/src/transport/axis Url.hpp Url.cpp TransportFactory.hpp TransportFactory.cpp Transport.hpp Transport.cpp Sender.hpp Sender.cpp
sanjaya 2004/04/08 23:44:07
Modified: c/src/transport/axis Url.hpp Url.cpp TransportFactory.hpp
TransportFactory.cpp Transport.hpp Transport.cpp
Sender.hpp Sender.cpp
Log:
Applied coding conventions.
Revision Changes Path
1.2 +53 -95 ws-axis/c/src/transport/axis/Url.hpp
Index: Url.hpp
===================================================================
RCS file: /home/cvs/ws-axis/c/src/transport/axis/Url.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Url.hpp 23 Mar 2004 05:38:58 -0000 1.1
+++ Url.hpp 9 Apr 2004 06:44:07 -0000 1.2
@@ -1,58 +1,17 @@
-/* -*- C++ -*- */
-
/*
- * The Apache Software License, Version 1.1
- *
+ * Copyright 2003-2004 The Apache Software Foundation.
*
- * Copyright (c) 2002 The Apache Software Foundation. All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- * if any, must include the following acknowledgment:
- * "This product includes software developed by the
- * Apache Software Foundation (http://www.apache.org/)."
- * Alternately, this acknowledgment may appear in the software itself,
- * if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "SOAP" and "Apache Software Foundation" must
- * not be used to endorse or promote products derived from this
- * software without prior written permission. For written
- * permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- * nor may "Apache" appear in their name, without prior written
- * permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation. For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
/*
@@ -68,28 +27,28 @@
#include <string>
-// Welknown ports
-const unsigned short HTTP_PORT = 80;
+/* Welknown ports */
+const unsigned short HTTP_PORT = 80;
const unsigned short HTTPS_PORT = 443;
const unsigned short FTP_PORT = 21;
-/**
- * Implementation of URL to manupulate URLs.
+/*
+ * Implementation of URL to manupulate URLs.
*
- * This implementation only supports subset of a URL
- * note that # references, userinfo query string
- * processing are not supported for this version.
+ * This implementation only supports subset of a URL
+ * note that # references, userinfo query string
+ * processing are not supported for this version.
*
- * URLs are of the form:
+ * URLs are of the form:
*
- * URL = protocol "://" server "/" [path]["?" query]
- * server = [userinfo "@"] hostname-port
- * hostname-port = hostname [ ":" port ]
- * userinfo = user[:password]
+ * URL = protocol "://" server "/" [path]["?" query]
+ * server = [userinfo "@"] hostname-port
+ * hostname-port = hostname [ ":" port ]
+ * userinfo = user[:password]
*
*
- * @brief Manupulate URLs
+ * @brief Manupulate URLs
*/
@@ -97,47 +56,46 @@
{
public:
- enum Protocol { http, https, ftp, file, unknown}; // for our purpose currently we need
- // http, https only. This is provided
- // To make extensible to
- // support other transports for RPC
- // but file????, yes we may require
- // pipes; with web-service????
+ enum Protocol { http, https, ftp, file, unknown};
+ /* for our purpose currently we need http, https only. This is provided
+ * To make extensible to support other transports for RPC but file????,
+ * yes we may require pipes; with web-service????
+ */
public:
- Url();
- Url(std::string url);
- ~Url();
-
- void SetProtocol(std::string prot);
- void SetProtocol(Protocol prot){m_Protocol = prot;}
- void SetHostName(std::string host){m_Host= host;}
- void SetResource(std::string path){m_Path = path;}
- void SetPort(unsigned short port){m_Port = port;}
-
- Protocol GetProtocol(){return m_Protocol;}
- std::string GetHostName(){return m_Host;}
- std::string GetResource(){return m_Path;}
+ Url();
+ Url(std::string url);
+ ~Url();
+
+ void SetProtocol(std::string prot);
+ void SetProtocol(Protocol prot){m_Protocol = prot;}
+ void SetHostName(std::string host){m_Host= host;}
+ void SetResource(std::string path){m_Path = path;}
+ void SetPort(unsigned short port){m_Port = port;}
+
+ Protocol GetProtocol(){return m_Protocol;}
+ std::string GetHostName(){return m_Host;}
+ std::string GetResource(){return m_Path;}
- unsigned short GetPort(){return m_Port;}
+ unsigned short GetPort(){return m_Port;}
- // other functions are not supported yet
+ // other functions are not supported yet
private:
- void ParseURL(std::string& url);
-
- Protocol m_Protocol;
- std::string m_Host;
- unsigned short m_Port;
- std::string m_Path;
- std::string m_Query;
+ void ParseURL(std::string& url);
+
+ Protocol m_Protocol;
+ std::string m_Host;
+ unsigned short m_Port;
+ std::string m_Path;
+ std::string m_Query;
std::string m_Password;
std::string m_User;
std::string m_URL;
};
-#endif // _AXIS_URL_HPP
+#endif
1.6 +109 -148 ws-axis/c/src/transport/axis/Url.cpp
Index: Url.cpp
===================================================================
RCS file: /home/cvs/ws-axis/c/src/transport/axis/Url.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- Url.cpp 24 Mar 2004 06:57:31 -0000 1.5
+++ Url.cpp 9 Apr 2004 06:44:07 -0000 1.6
@@ -1,58 +1,17 @@
-/* -*- C++ -*- */
-
/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2002 The Apache Software Foundation. All rights
- * reserved.
+ * Copyright 2003-2004 The Apache Software Foundation.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- * if any, must include the following acknowledgment:
- * "This product includes software developed by the
- * Apache Software Foundation (http://www.apache.org/)."
- * Alternately, this acknowledgment may appear in the software itself,
- * if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Axis" and "Apache Software Foundation" must
- * not be used to endorse or promote products derived from this
- * software without prior written permission. For written
- * permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- * nor may "Apache" appear in their name, without prior written
- * permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation. For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
/*
@@ -71,23 +30,23 @@
Url::Url()
- : m_Protocol(unknown), m_Port(0)
+ : m_Protocol(unknown), m_Port(0)
{
- //cout << "inside Url constructor" << endl;
+ /* cout << "inside Url constructor" << endl; */
}
Url::Url(std::string url)
{
- m_URL = url;
- if(isascii((int)url.at(0)))
- {
- // check this a valid URL
- if((url.at(1) == (int)':') &&
- ((url.at(2) == (int)'/') || (url.at(2) == (int)'\\')))
- return;
- else // assume valid URL hence, proceed with finding entries
- ParseURL(url);
- }
+ m_URL = url;
+ if(isascii((int)url.at(0)))
+ {
+ /* check this a valid URL */
+ if((url.at(1) == (int)':') &&
+ ((url.at(2) == (int)'/') || (url.at(2) == (int)'\\')))
+ return;
+ else /* assume valid URL hence, proceed with finding entries */
+ ParseURL(url);
+ }
}
Url::~Url()
@@ -97,100 +56,102 @@
void Url::SetProtocol(std::string prot)
{
- m_Port = 0;
- if(prot == "http")
- {
- m_Protocol = http;
- m_Port = HTTP_PORT;
- }
- else if( prot == "file")
- {
- m_Protocol = file;
- }
- else if( prot == "ftp")
- {
- m_Protocol = ftp;
- m_Port = FTP_PORT;
- }
- else if( prot == "https")
- {
-
- m_Protocol = https;
- m_Port = HTTPS_PORT;
- }
- else
- m_Protocol = unknown;
+ m_Port = 0;
+ if(prot == "http")
+ {
+ m_Protocol = http;
+ m_Port = HTTP_PORT;
+ }
+ else if( prot == "file")
+ {
+ m_Protocol = file;
+ }
+ else if( prot == "ftp")
+ {
+ m_Protocol = ftp;
+ m_Port = FTP_PORT;
+ }
+ else if( prot == "https")
+ {
+
+ m_Protocol = https;
+ m_Port = HTTPS_PORT;
+ }
+ else
+ m_Protocol = unknown;
}
void Url::ParseURL(std::string& url)
{
- std::string::size_type begpos, pos;
+ std::string::size_type begpos, pos;
- // try to find out the protocol
- if((pos = url.find("://")) != std::string::npos)
- {
- SetProtocol(url.substr(0, pos));
- // find m_Host name
- if(m_Protocol != unknown)
- {
- url = url.substr(pos + 3); // rest of the URL string
- begpos = pos = 0;
- std::string key(":/?");
-
- while((pos = url.find_first_of(key, begpos)))
- {
- if(pos == std::string::npos) // only host name found
- {
- if(m_Host.empty())
- m_Host = url;
- if (key == "?") // found path
- m_Path = url.substr(begpos - 1);
- break;
- }
- else
- if(pos == 0) break;
-
- switch(url.at(pos))
- {
- case ':':
- if(m_Host.empty())
- m_Host = url.substr(begpos, pos - begpos);
- pos++;
- begpos = pos;
- key = "/?"; // scan for the rest to get the path & query
- continue;
-
- case '/':
- if (key == "/?") // found port number
- {
- m_Port = atoi(url.substr(begpos, pos - begpos + 1).c_str());
- if(m_Host.empty())
- m_Host = url.substr(0, begpos - 1);
- }
- else
- m_Host = url.substr(0, pos);
- pos++;
- begpos = pos;
- key = "?";
- continue;
-
- case '?':
- // not correctly supported
- m_Query = url.substr(pos);
- break;
- }
- break;
- }
- }
- }
+ /* try to find out the protocol */
+ if((pos = url.find("://")) != std::string::npos)
+ {
+ SetProtocol(url.substr(0, pos));
+ /* find m_Host name */
+ if(m_Protocol != unknown)
+ {
+ url = url.substr(pos + 3); /* rest of the URL string */
+ begpos = pos = 0;
+ std::string key(":/?");
+
+ while((pos = url.find_first_of(key, begpos)))
+ {
+ if(pos == std::string::npos) /* only host name found */
+ {
+ if(m_Host.empty())
+ m_Host = url;
+ if (key == "?") /* found path */
+ m_Path = url.substr(begpos - 1);
+ break;
+ }
+ else
+ if(pos == 0) break;
+
+ switch(url.at(pos))
+ {
+ case ':':
+ if(m_Host.empty())
+ m_Host = url.substr(begpos, pos - begpos);
+ pos++;
+ begpos = pos;
+ key = "/?";
+ /* scan for the rest to get the path & query */
+ continue;
+
+ case '/':
+ if (key == "/?") /* found port number */
+ {
+ m_Port = atoi(url.substr(begpos,
+ pos - begpos + 1).c_str());
+ if(m_Host.empty())
+ m_Host = url.substr(0, begpos - 1);
+ }
+ else
+ m_Host = url.substr(0, pos);
+ pos++;
+ begpos = pos;
+ key = "?";
+ continue;
+
+ case '?':
+ /* not correctly supported */
+ m_Query = url.substr(pos);
+ break;
+ }
+ break;
+ }
+ }
+ }
}
-
+
-
+
1.2 +25 -65 ws-axis/c/src/transport/axis/TransportFactory.hpp
Index: TransportFactory.hpp
===================================================================
RCS file: /home/cvs/ws-axis/c/src/transport/axis/TransportFactory.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- TransportFactory.hpp 23 Mar 2004 05:38:58 -0000 1.1
+++ TransportFactory.hpp 9 Apr 2004 06:44:07 -0000 1.2
@@ -1,58 +1,17 @@
-/* -*- C++ -*- */
-
/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2002 The Apache Software Foundation. All rights
- * reserved.
+ * Copyright 2003-2004 The Apache Software Foundation.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- * if any, must include the following acknowledgment:
- * "This product includes software developed by the
- * Apache Software Foundation (http://www.apache.org/)."
- * Alternately, this acknowledgment may appear in the software itself,
- * if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "SOAP" and "Apache Software Foundation" must
- * not be used to endorse or promote products derived from this
- * software without prior written permission. For written
- * permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- * nor may "Apache" appear in their name, without prior written
- * permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation. For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
/*
@@ -67,14 +26,14 @@
#define _AXIS_TRANSPORTFACTORY_HPP
-/**
- * Create undeline transport for SOAP-Envelops carrier for a given URL
- * URL determine which transport to be instantiated for carring SOAP
- * Envelop.
- *
- * @todo Hope this require of creating Transport by specifing a property
- * such as name; not just the URL.
- * @brief The Transport Factory to instantiate a Tranport for SOAP envelop carring
+/*
+ * Create undeline transport for SOAP-Envelops carrier for a given URL
+ * URL determine which transport to be instantiated for carring SOAP Envelop.
+ *
+ * @todo Hope this require of creating Transport by specifing a property
+ * such as name; not just the URL.
+ * @brief The Transport Factory to instantiate a Tranport for SOAP envelop
+ * carring
*
*/
@@ -83,12 +42,13 @@
class TransportFactory
{
private:
- TransportFactory(){};
- virtual ~TransportFactory(){};
+ TransportFactory(){};
+ virtual ~TransportFactory(){};
public:
- static Transport* GetTransport(Url& url, bool secure); // return transport object according to URL info
+ static Transport* GetTransport(Url& url, bool secure);
+ /* return transport object according to URL info */
};
-#endif // _AXIS_TRANSPORTFACTORY_HPP
+#endif
1.10 +26 -67 ws-axis/c/src/transport/axis/TransportFactory.cpp
Index: TransportFactory.cpp
===================================================================
RCS file: /home/cvs/ws-axis/c/src/transport/axis/TransportFactory.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- TransportFactory.cpp 30 Mar 2004 15:10:58 -0000 1.9
+++ TransportFactory.cpp 9 Apr 2004 06:44:07 -0000 1.10
@@ -1,58 +1,17 @@
-/* -*- C++ -*- */
-
/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2002 The Apache Software Foundation. All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- * if any, must include the following acknowledgment:
- * "This product includes software developed by the
- * Apache Software Foundation (http://www.apache.org/)."
- * Alternately, this acknowledgment may appear in the software itself,
- * if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Axis" and "Apache Software Foundation" must
- * not be used to endorse or promote products derived from this
- * software without prior written permission. For written
- * permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- * nor may "Apache" appear in their name, without prior written
- * permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
+ * Copyright 2003-2004 The Apache Software Foundation.
*
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation. For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
@@ -64,19 +23,19 @@
Transport* TransportFactory::GetTransport(Url& url, bool secure)
{
- if(url.GetProtocol() == Url::http)
- {
- return new HttpTransport(url, UNSECURE);
- }
- else if(url.GetProtocol() == Url::https)
- {
- return new HttpTransport(url, SECURE); // currently not supported
- }
- else if(url.GetProtocol() == Url::ftp)
- {
- return NULL; // currently not supported
- }
- else
- return NULL; // currently not supported
+ if(url.GetProtocol() == Url::http)
+ {
+ return new HttpTransport(url, UNSECURE);
+ }
+ else if(url.GetProtocol() == Url::https)
+ {
+ return new HttpTransport(url, SECURE); /* currently not supported */
+ }
+ else if(url.GetProtocol() == Url::ftp)
+ {
+ return NULL; /* currently not supported */
+ }
+ else
+ return NULL; /* currently not supported */
}
1.2 +30 -71 ws-axis/c/src/transport/axis/Transport.hpp
Index: Transport.hpp
===================================================================
RCS file: /home/cvs/ws-axis/c/src/transport/axis/Transport.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Transport.hpp 23 Mar 2004 05:38:58 -0000 1.1
+++ Transport.hpp 9 Apr 2004 06:44:07 -0000 1.2
@@ -1,58 +1,17 @@
-/* -*- C++ -*- */
-
/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2002 The Apache Software Foundation. All rights
- * reserved.
+ * Copyright 2003-2004 The Apache Software Foundation.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- * if any, must include the following acknowledgment:
- * "This product includes software developed by the
- * Apache Software Foundation (http://www.apache.org/)."
- * Alternately, this acknowledgment may appear in the software itself,
- * if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "SOAP" and "Apache Software Foundation" must
- * not be used to endorse or promote products derived from this
- * software without prior written permission. For written
- * permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- * nor may "Apache" appear in their name, without prior written
- * permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation. For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
/*
@@ -68,31 +27,31 @@
#define _AXIS_TRANSPORT_HPP
#include "Url.hpp"
-
+
/**
*
- * Implements Transport as SOAP-Envelop carrier, for sending/receiving
- * SOAP Envelops with any protocol; This implementation abstract the
- * Transport layer for the SOAP payloads
- *
- * @brief The Transport interface for SOAP envelop carrier
+ * Implements Transport as SOAP-Envelop carrier, for sending/receiving
+ * SOAP Envelops with any protocol; This implementation abstract the
+ * Transport layer for the SOAP payloads
+ *
+ * @brief The Transport interface for SOAP envelop carrier
*
*/
class Transport
{
public:
- Transport();
- virtual ~Transport();
+ Transport();
+ virtual ~Transport();
- virtual bool Init() { return false;} // Initialize transport channel
- virtual void Fini(){};
- virtual bool GetStatus(const std::string& payload){return m_bStatus;}
- virtual void SetProperty(const char* p_Property, const char* p_Value)=0;
+ virtual bool Init() { return false;} /* Initialize transport channel */
+ virtual void Fini(){};
+ virtual bool GetStatus(const std::string& payload){return m_bStatus;}
+ virtual void SetProperty(const char* p_Property, const char* p_Value)=0;
- virtual const Transport& operator >> (const char** pMsg){*pMsg=NULL;return *this;}
- virtual const Transport& operator << (const char* msg)=0;
+ virtual const Transport& operator >> (const char** pMsg){*pMsg=NULL;return *this;}
+ virtual const Transport& operator << (const char* msg)=0;
virtual void ClearAdditionalHeaders(){};
virtual int getBodyLength() = 0;
virtual void setBodyLength(int bodyLength) = 0;
@@ -101,12 +60,12 @@
protected:
- Url m_Url;
- std::string m_strUrl;
- bool m_bStatus;
+ Url m_Url;
+ std::string m_strUrl;
+ bool m_bStatus;
};
-#endif // _AXIS_TRANSPORT_HPP
+#endif
1.7 +12 -53 ws-axis/c/src/transport/axis/Transport.cpp
Index: Transport.cpp
===================================================================
RCS file: /home/cvs/ws-axis/c/src/transport/axis/Transport.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- Transport.cpp 24 Mar 2004 06:57:31 -0000 1.6
+++ Transport.cpp 9 Apr 2004 06:44:07 -0000 1.7
@@ -1,58 +1,17 @@
-/* -*- C++ -*- */
-
/*
- * The Apache Software License, Version 1.1
+ * Copyright 2003-2004 The Apache Software Foundation.
*
- *
- * Copyright (c) 2002 The Apache Software Foundation. All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- * if any, must include the following acknowledgment:
- * "This product includes software developed by the
- * Apache Software Foundation (http://www.apache.org/)."
- * Alternately, this acknowledgment may appear in the software itself,
- * if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Axis" and "Apache Software Foundation" must
- * not be used to endorse or promote products derived from this
- * software without prior written permission. For written
- * permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- * nor may "Apache" appear in their name, without prior written
- * permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation. For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
1.4 +21 -62 ws-axis/c/src/transport/axis/Sender.hpp
Index: Sender.hpp
===================================================================
RCS file: /home/cvs/ws-axis/c/src/transport/axis/Sender.hpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Sender.hpp 24 Mar 2004 06:57:31 -0000 1.3
+++ Sender.hpp 9 Apr 2004 06:44:07 -0000 1.4
@@ -1,58 +1,17 @@
-/* -*- C++ -*- */
-
/*
- * The Apache Software License, Version 1.1
- *
- *
- * Copyright (c) 2002 The Apache Software Foundation. All rights
- * reserved.
+ * Copyright 2003-2004 The Apache Software Foundation.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- * if any, must include the following acknowledgment:
- * "This product includes software developed by the
- * Apache Software Foundation (http://www.apache.org/)."
- * Alternately, this acknowledgment may appear in the software itself,
- * if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "SOAP" and "Apache Software Foundation" must
- * not be used to endorse or promote products derived from this
- * software without prior written permission. For written
- * permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- * nor may "Apache" appear in their name, without prior written
- * permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation. For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
/*
@@ -73,17 +32,17 @@
class Sender
{
- public:
- Sender(Transport *pTr);
- ~Sender();
-
- bool Send(const char* what) throw (AxisException);
- void SetProperty(const char* sProperty, const char* sValue);
+ public:
+ Sender(Transport *pTr);
+ ~Sender();
+
+ bool Send(const char* what) throw (AxisException);
+ void SetProperty(const char* sProperty, const char* sValue);
void ClearAdditionalHeaders();
- private:
- Transport *m_pTrChannel;
+ private:
+ Transport *m_pTrChannel;
};
-#endif // _AXIS_SENDER_HPP
+#endif
1.9 +24 -64 ws-axis/c/src/transport/axis/Sender.cpp
Index: Sender.cpp
===================================================================
RCS file: /home/cvs/ws-axis/c/src/transport/axis/Sender.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- Sender.cpp 24 Mar 2004 06:57:31 -0000 1.8
+++ Sender.cpp 9 Apr 2004 06:44:07 -0000 1.9
@@ -1,59 +1,19 @@
-/* -*- C++ -*- */
-
/*
- * The Apache Software License, Version 1.1
- *
+ * Copyright 2003-2004 The Apache Software Foundation.
*
- * Copyright (c) 2002 The Apache Software Foundation. All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- * if any, must include the following acknowledgment:
- * "This product includes software developed by the
- * Apache Software Foundation (http://www.apache.org/)."
- * Alternately, this acknowledgment may appear in the software itself,
- * if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Axis" and "Apache Software Foundation" must
- * not be used to endorse or promote products derived from this
- * software without prior written permission. For written
- * permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- * nor may "Apache" appear in their name, without prior written
- * permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation. For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*/
+
/*
*
*
@@ -66,7 +26,7 @@
Sender::Sender(Transport *pTr)
- : m_pTrChannel(pTr)
+ : m_pTrChannel(pTr)
{
}
@@ -83,21 +43,21 @@
bool Sender::Send(const char* what) throw (AxisException)
{
- try
- {
- *m_pTrChannel << what;
- }
- catch(...)
- {
- throw AxisException(SENDING_ERROR);
- }
+ try
+ {
+ *m_pTrChannel << what;
+ }
+ catch(...)
+ {
+ throw AxisException(SENDING_ERROR);
+ }
- return true;
+ return true;
}
void Sender::SetProperty(const char* sProperty, const char* sValue)
{
- m_pTrChannel->SetProperty(sProperty, sValue);
+ m_pTrChannel->SetProperty(sProperty, sValue);
}