Hi Samisa
I have attached the source code files with a description.
1.Google.cpp - File written by me for Client side which calls doGoogleSearch
2.GoogleSearchPort.cpp1(renamed) - Original GoogleSearchPort .cpp file generated by wsdl2ws tool
3.error1 - SOAP message generated when GoogleSearchPort.cpp1 was used
4.GoogleSearchPort2.cpp2(modified) - Order of function calls changed to that of wsdl as shown below
m_pCall->addParameter((void*)&Value1, "key", XSD_STRING);
m_pCall->addParameter((void*)&Value9, "q", XSD_STRING);
m_pCall->addParameter((void*)&Value3, "start", XSD_INT);
m_pCall->addParameter((void*)&Value7, "maxResults", XSD_INT);
m_pCall->addParameter((void*)&Value0, "filter", XSD_BOOLEAN);
m_pCall->addParameter((void*)&Value2, "restrict", XSD_STRING);
m_pCall->addParameter((void*)&Value5, "safeSearch", XSD_BOOLEAN);
m_pCall->addParameter((void*)&Value6, "lr", XSD_STRING);
m_pCall->addParameter((void*)&Value4, "ie", XSD_STRING);
m_pCall->addParameter((void*)&Value8, "oe", XSD_STRING);
5.error2 - SOAP message generated when GoogleSearchPort.cpp2(modified) was used
6.All other files generated by the WSDL2WS tool are attached
7.compile - sample script to compile files
After the run with GoogleSearchPort.cpp2(modified) the code exits with a segmentation fault
Regards Krishna
uic.edu/~krajag2
Hi Krishna, It would be helpfult to fix this problem if you could send the SOAP message and the generated code that you are using.
Thanks, Samisa,,,
/* * This file was auto-generated by the Axis C++ Web Service Generator (WSDL2Ws) * This file contains functions to manipulate complex type DirectoryCategory */
#include "DirectoryCategory.hpp"
#include <axis/AxisWrapperAPI.hpp>
/*
* This static method serialize a DirectoryCategory type of object
*/
int Axis_Serialize_DirectoryCategory(DirectoryCategory* param, IWrapperSoapSerializer* pSZ, bool bArray = false)
{
if (bArray)
{
pSZ->serialize("<", Axis_TypeName_DirectoryCategory, ">", NULL);
}
else
{
const AxisChar* sPrefix = pSZ->getNamespacePrefix(Axis_URI_DirectoryCategory);
pSZ->serialize("<", Axis_TypeName_DirectoryCategory, " xsi:type=\"", sPrefix, ":",
Axis_TypeName_DirectoryCategory, "\" xmlns:", sPrefix, "=\"",
Axis_URI_DirectoryCategory, "\">", NULL);
}
pSZ->serializeAsElement("fullViewableName", (void*)&(param->fullViewableName), XSD_STRING);
pSZ->serializeAsElement("specialEncoding", (void*)&(param->specialEncoding), XSD_STRING);
pSZ->serialize("</", Axis_TypeName_DirectoryCategory, ">", NULL);
return AXIS_SUCCESS;
}
/*
* This static method deserialize a DirectoryCategory type of object
*/
int Axis_DeSerialize_DirectoryCategory(DirectoryCategory* param, IWrapperSoapDeSerializer* pIWSDZ)
{
param->fullViewableName = pIWSDZ->getElementAsString("fullViewableName",0);
param->specialEncoding = pIWSDZ->getElementAsString("specialEncoding",0);
return pIWSDZ->getStatus();
}
void* Axis_Create_DirectoryCategory(DirectoryCategory* pObj, bool bArray = false, int nSize=0)
{
if (bArray && (nSize > 0))
{
if (pObj)
{
DirectoryCategory* pNew = new DirectoryCategory[nSize];
memcpy(pNew, pObj, sizeof(DirectoryCategory)*nSize/2);
memset(pObj, 0, sizeof(DirectoryCategory)*nSize/2);
delete [] pObj;
return pNew;
}
else
{
return new DirectoryCategory[nSize];
}
}
else
return new DirectoryCategory;
}
/*
* This static method delete a DirectoryCategory type of object
*/
void Axis_Delete_DirectoryCategory(DirectoryCategory* param, bool bArray = false, int nSize=0)
{
if (bArray)
{
delete [] param;
}
else
{
delete param;
}
}
/*
* This static method gives the size of DirectoryCategory type of object
*/
int Axis_GetSize_DirectoryCategory()
{
return sizeof(DirectoryCategory);
}
DirectoryCategory::DirectoryCategory()
{
/*do not allocate memory to any pointer members here
because deserializer will allocate memory anyway. */
memset( &fullViewableName, 0, sizeof( xsd__string));
memset( &specialEncoding, 0, sizeof( xsd__string));
}
DirectoryCategory::~DirectoryCategory()
{
/*delete any pointer and array members here*/
}
/*
* This file was auto-generated by the Axis C++ Web Service Generator (WSDL2Ws)
* This file contains functions to manipulate complex type DirectoryCategory
*/
#if !defined(__DIRECTORYCATEGORY_PARAM_H__INCLUDED_)
#define __DIRECTORYCATEGORY_PARAM_H__INCLUDED_
#include <axis/AxisUserAPI.hpp>
AXIS_CPP_NAMESPACE_USE
/*Local name and the URI for the type*/
static const char* Axis_URI_DirectoryCategory = "urn:GoogleSearch";
static const char* Axis_TypeName_DirectoryCategory = "DirectoryCategory";
class DirectoryCategory
{
public:
xsd__string fullViewableName;
xsd__string specialEncoding;
DirectoryCategory();
virtual ~DirectoryCategory();
};
#endif /* !defined(__DIRECTORYCATEGORY_PARAM_H__INCLUDED_)*/
/*
* This file was auto-generated by the Axis C++ Web Service Generator (WSDL2Ws)
* This file contains functions to manipulate complex type DirectoryCategory_Array
*/
#if !defined(__DIRECTORYCATEGORY_ARRAY_ARRAY_H__INCLUDED_)
#define __DIRECTORYCATEGORY_ARRAY_ARRAY_H__INCLUDED_
class DirectoryCategory;
typedef struct DirectoryCategory_ArrayTag
{
DirectoryCategory* m_Array;
int m_Size;
} DirectoryCategory_Array;
#endif /* !defined(__DIRECTORYCATEGORY_ARRAY_ARRAY_H__INCLUDED_)*/
#include <iostream>
#include "GoogleSearchPort.hpp"
using namespace std;
int main()
{
try{
GoogleSearchResult *GSR1;//Result to store Google Search Result
GoogleSearchPort GSP1;//Result to store Google Search Port
GSR1=GSP1.doGoogleSearch((axiscpp::xsd__boolean)true,
<GoogleKey>,
"no",
1,
"utf",
(axiscpp::xsd__boolean)false,
"blank",
3,
"blank",
"LAC UIC");
cout<<"Google Search Result - Query String "<<GSR1->searchQuery;
}catch(GoogleSearchService_AxisClientException e)
{
cout<<"\n This is an Exceptioncode :"<<e.getExceptionCode();
cout<<"\n This is the Exception :"<<e.getMessage(e.getExceptionCode());
cout<<"\n e.what()"<<e.what();
}
}
/*
* This file was auto-generated by the Axis C++ Web Service Generator (WSDL2Ws)
* This file contains Client Stub implementation for remote web service.
*/
#include "GoogleSearchPort.hpp"
#include <axis/AxisWrapperAPI.hpp>
using namespace std;
extern int Axis_DeSerialize_GoogleSearchResult(GoogleSearchResult* param,
IWrapperSoapDeSerializer* pDZ);
extern void* Axis_Create_GoogleSearchResult(GoogleSearchResult *Obj, bool
bArray = false, int nSize=0);
extern void Axis_Delete_GoogleSearchResult(GoogleSearchResult* param, bool
bArray = false, int nSize=0);
extern int Axis_Serialize_GoogleSearchResult(GoogleSearchResult* param,
IWrapperSoapSerializer* pSZ, bool bArray = false);
extern int Axis_GetSize_GoogleSearchResult();
extern int Axis_DeSerialize_ResultElement(ResultElement* param,
IWrapperSoapDeSerializer* pDZ);
extern void* Axis_Create_ResultElement(ResultElement *Obj, bool bArray = false,
int nSize=0);
extern void Axis_Delete_ResultElement(ResultElement* param, bool bArray =
false, int nSize=0);
extern int Axis_Serialize_ResultElement(ResultElement* param,
IWrapperSoapSerializer* pSZ, bool bArray = false);
extern int Axis_GetSize_ResultElement();
extern int Axis_DeSerialize_DirectoryCategory(DirectoryCategory* param,
IWrapperSoapDeSerializer* pDZ);
extern void* Axis_Create_DirectoryCategory(DirectoryCategory *Obj, bool bArray
= false, int nSize=0);
extern void Axis_Delete_DirectoryCategory(DirectoryCategory* param, bool bArray
= false, int nSize=0);
extern int Axis_Serialize_DirectoryCategory(DirectoryCategory* param,
IWrapperSoapSerializer* pSZ, bool bArray = false);
extern int Axis_GetSize_DirectoryCategory();
GoogleSearchPort::GoogleSearchPort(const char* pchEndpointUri,
AXIS_PROTOCOL_TYPE eProtocol)
:Stub(pchEndpointUri, eProtocol)
{
}
GoogleSearchPort::GoogleSearchPort()
:Stub(" ", APTHTTP1_1)
{
m_pCall->setEndpointURI("http://api.google.com/search/beta2");
}
GoogleSearchPort::~GoogleSearchPort()
{
}
/*Methods corresponding to the web service methods*/
/*
* This method wrap the service method doGetCachedPage
*/
xsd__base64Binary GoogleSearchPort::doGetCachedPage(xsd__string Value0,
xsd__string Value1)
{
xsd__base64Binary Ret;
Ret.__ptr = NULL;
Ret.__size = 0;
const char* pcCmplxFaultName;
try
{
if (AXIS_SUCCESS != m_pCall->initialize(CPP_RPC_PROVIDER,
NORMAL_CHANNEL))
return Ret;
m_pCall->setTransportProperty(SOAPACTION_HEADER ,
"urn:GoogleSearchAction");
m_pCall->setSOAPVersion(SOAP_VER_1_1);
m_pCall->setOperation("doGetCachedPage", "urn:GoogleSearch");
applyUserPreferences();
m_pCall->addParameter((void*)&Value0, "key", XSD_STRING);
m_pCall->addParameter((void*)&Value1, "url", XSD_STRING);
if (AXIS_SUCCESS == m_pCall->invoke())
{
if(AXIS_SUCCESS ==
m_pCall->checkMessage("doGetCachedPageResponse", "urn:GoogleSearch"))
{
Ret =
m_pCall->getElementAsBase64Binary("_return", 0);
}
}
updateStateAfterResponse();
m_pCall->unInitialize();
return Ret;
}
catch(AxisException& e)
{
int iExceptionCode = e.getExceptionCode();
if(AXISC_NODE_VALUE_MISMATCH_EXCEPTION != iExceptionCode)
{
updateStateAfterResponse();
m_pCall->unInitialize();
throw GoogleSearchService_AxisClientException(e.what());
}
ISoapFault* pSoapFault = (ISoapFault*)
m_pCall->checkFault("Fault","http://api.google.com/search/beta2" );
if(pSoapFault)
{
updateStateAfterResponse();
m_pCall->unInitialize();
throw
GoogleSearchService_AxisClientException(pSoapFault);
}
else throw;
}
}
/*
* This method wrap the service method doSpellingSuggestion
*/
xsd__string GoogleSearchPort::doSpellingSuggestion(xsd__string Value0,
xsd__string Value1)
{
xsd__string Ret = NULL;
const char* pcCmplxFaultName;
try
{
if (AXIS_SUCCESS != m_pCall->initialize(CPP_RPC_PROVIDER,
NORMAL_CHANNEL))
return Ret;
m_pCall->setTransportProperty(SOAPACTION_HEADER ,
"urn:GoogleSearchAction");
m_pCall->setSOAPVersion(SOAP_VER_1_1);
m_pCall->setOperation("doSpellingSuggestion",
"urn:GoogleSearch");
applyUserPreferences();
m_pCall->addParameter((void*)&Value0, "key", XSD_STRING);
m_pCall->addParameter((void*)&Value1, "phrase", XSD_STRING);
if (AXIS_SUCCESS == m_pCall->invoke())
{
if(AXIS_SUCCESS ==
m_pCall->checkMessage("doSpellingSuggestionResponse", "urn:GoogleSearch"))
{
Ret = m_pCall->getElementAsString("_return", 0);
}
}
updateStateAfterResponse();
m_pCall->unInitialize();
return Ret;
}
catch(AxisException& e)
{
int iExceptionCode = e.getExceptionCode();
if(AXISC_NODE_VALUE_MISMATCH_EXCEPTION != iExceptionCode)
{
updateStateAfterResponse();
m_pCall->unInitialize();
throw GoogleSearchService_AxisClientException(e.what());
}
ISoapFault* pSoapFault = (ISoapFault*)
m_pCall->checkFault("Fault","http://api.google.com/search/beta2" );
if(pSoapFault)
{
updateStateAfterResponse();
m_pCall->unInitialize();
throw
GoogleSearchService_AxisClientException(pSoapFault);
}
else throw;
}
}
/*
* This method wrap the service method doGoogleSearch
*/
GoogleSearchResult* GoogleSearchPort::doGoogleSearch(xsd__boolean Value0,
xsd__string Value1, xsd__string Value2, xsd__int Value3, xsd__string Value4,
xsd__boolean Value5, xsd__string Value6, xsd__int Value7, xsd__string Value8,
xsd__string Value9)
{
GoogleSearchResult* pReturn = NULL;
const char* pcCmplxFaultName;
try
{
if (AXIS_SUCCESS != m_pCall->initialize(CPP_RPC_PROVIDER,
NORMAL_CHANNEL))
return pReturn;
m_pCall->setTransportProperty(SOAPACTION_HEADER ,
"urn:GoogleSearchAction");
m_pCall->setSOAPVersion(SOAP_VER_1_1);
m_pCall->setOperation("doGoogleSearch", "urn:GoogleSearch");
applyUserPreferences();
m_pCall->addParameter((void*)&Value0, "filter", XSD_BOOLEAN);
m_pCall->addParameter((void*)&Value1, "key", XSD_STRING);
m_pCall->addParameter((void*)&Value2, "restrict", XSD_STRING);
m_pCall->addParameter((void*)&Value3, "start", XSD_INT);
m_pCall->addParameter((void*)&Value4, "ie", XSD_STRING);
m_pCall->addParameter((void*)&Value5, "safeSearch",
XSD_BOOLEAN);
m_pCall->addParameter((void*)&Value6, "lr", XSD_STRING);
m_pCall->addParameter((void*)&Value7, "maxResults", XSD_INT);
m_pCall->addParameter((void*)&Value8, "oe", XSD_STRING);
m_pCall->addParameter((void*)&Value9, "q", XSD_STRING);
if (AXIS_SUCCESS == m_pCall->invoke())
{
if(AXIS_SUCCESS ==
m_pCall->checkMessage("doGoogleSearchResponse", "urn:GoogleSearch"))
{
pReturn =
(GoogleSearchResult*)m_pCall->getCmplxObject((void*)
Axis_DeSerialize_GoogleSearchResult, (void*) Axis_Create_GoogleSearchResult,
(void*) Axis_Delete_GoogleSearchResult,"_return", 0);
}
}
updateStateAfterResponse();
m_pCall->unInitialize();
return pReturn;
}
catch(AxisException& e)
{
int iExceptionCode = e.getExceptionCode();
if(AXISC_NODE_VALUE_MISMATCH_EXCEPTION != iExceptionCode)
{
updateStateAfterResponse();
m_pCall->unInitialize();
throw GoogleSearchService_AxisClientException(e.what());
}
ISoapFault* pSoapFault = (ISoapFault*)
m_pCall->checkFault("Fault","http://api.google.com/search/beta2" );
if(pSoapFault)
{
updateStateAfterResponse();
m_pCall->unInitialize();
throw
GoogleSearchService_AxisClientException(pSoapFault);
}
else throw;
}
}
int GoogleSearchPort::getFaultDetail(char** ppcDetail)
{
return m_pCall->getFaultDetail(ppcDetail);
}
/*
* This file was auto-generated by the Axis C++ Web Service Generator (WSDL2Ws)
* This file contains Client Stub implementation for remote web service.
*/
/*
This file has been manually modified -- Please search for Krishna to
find modifications
*/
#include "GoogleSearchPort.hpp"
#include <axis/AxisWrapperAPI.hpp>
using namespace std;
extern int Axis_DeSerialize_GoogleSearchResult(GoogleSearchResult* param,
IWrapperSoapDeSerializer* pDZ);
extern void* Axis_Create_GoogleSearchResult(GoogleSearchResult *Obj, bool
bArray = false, int nSize=0);
extern void Axis_Delete_GoogleSearchResult(GoogleSearchResult* param, bool
bArray = false, int nSize=0);
extern int Axis_Serialize_GoogleSearchResult(GoogleSearchResult* param,
IWrapperSoapSerializer* pSZ, bool bArray = false);
extern int Axis_GetSize_GoogleSearchResult();
extern int Axis_DeSerialize_ResultElement(ResultElement* param,
IWrapperSoapDeSerializer* pDZ);
extern void* Axis_Create_ResultElement(ResultElement *Obj, bool bArray = false,
int nSize=0);
extern void Axis_Delete_ResultElement(ResultElement* param, bool bArray =
false, int nSize=0);
extern int Axis_Serialize_ResultElement(ResultElement* param,
IWrapperSoapSerializer* pSZ, bool bArray = false);
extern int Axis_GetSize_ResultElement();
extern int Axis_DeSerialize_DirectoryCategory(DirectoryCategory* param,
IWrapperSoapDeSerializer* pDZ);
extern void* Axis_Create_DirectoryCategory(DirectoryCategory *Obj, bool bArray
= false, int nSize=0);
extern void Axis_Delete_DirectoryCategory(DirectoryCategory* param, bool bArray
= false, int nSize=0);
extern int Axis_Serialize_DirectoryCategory(DirectoryCategory* param,
IWrapperSoapSerializer* pSZ, bool bArray = false);
extern int Axis_GetSize_DirectoryCategory();
GoogleSearchPort::GoogleSearchPort(const char* pchEndpointUri,
AXIS_PROTOCOL_TYPE eProtocol)
:Stub(pchEndpointUri, eProtocol)
{
}
GoogleSearchPort::GoogleSearchPort()
:Stub(" ", APTHTTP1_1)
{
m_pCall->setEndpointURI("http://api.google.com/search/beta2");
}
GoogleSearchPort::~GoogleSearchPort()
{
}
/*Methods corresponding to the web service methods*/
/*
* This method wrap the service method doGetCachedPage
*/
xsd__base64Binary GoogleSearchPort::doGetCachedPage(xsd__string Value0,
xsd__string Value1)
{
xsd__base64Binary Ret;
Ret.__ptr = NULL;
Ret.__size = 0;
const char* pcCmplxFaultName;
try
{
if (AXIS_SUCCESS != m_pCall->initialize(CPP_RPC_PROVIDER,
NORMAL_CHANNEL))
return Ret;
m_pCall->setTransportProperty(SOAPACTION_HEADER ,
"urn:GoogleSearchAction");
m_pCall->setSOAPVersion(SOAP_VER_1_1);
m_pCall->setOperation("doGetCachedPage", "urn:GoogleSearch");
applyUserPreferences();
m_pCall->addParameter((void*)&Value0, "key", XSD_STRING);
m_pCall->addParameter((void*)&Value1, "url", XSD_STRING);
if (AXIS_SUCCESS == m_pCall->invoke())
{
if(AXIS_SUCCESS ==
m_pCall->checkMessage("doGetCachedPageResponse", "urn:GoogleSearch"))
{
Ret =
m_pCall->getElementAsBase64Binary("_return", 0);
}
}
updateStateAfterResponse();
m_pCall->unInitialize();
return Ret;
}
catch(AxisException& e)
{
int iExceptionCode = e.getExceptionCode();
if(AXISC_NODE_VALUE_MISMATCH_EXCEPTION != iExceptionCode)
{
updateStateAfterResponse();
m_pCall->unInitialize();
throw GoogleSearchService_AxisClientException(e.what());
}
ISoapFault* pSoapFault = (ISoapFault*)
m_pCall->checkFault("Fault","http://api.google.com/search/beta2" );
if(pSoapFault)
{
updateStateAfterResponse();
m_pCall->unInitialize();
throw
GoogleSearchService_AxisClientException(pSoapFault);
}
else throw;
}
}
/*
* This method wrap the service method doSpellingSuggestion
*/
xsd__string GoogleSearchPort::doSpellingSuggestion(xsd__string Value0,
xsd__string Value1)
{
xsd__string Ret = NULL;
const char* pcCmplxFaultName;
try
{
if (AXIS_SUCCESS != m_pCall->initialize(CPP_RPC_PROVIDER,
NORMAL_CHANNEL))
return Ret;
m_pCall->setTransportProperty(SOAPACTION_HEADER ,
"urn:GoogleSearchAction");
m_pCall->setSOAPVersion(SOAP_VER_1_1);
m_pCall->setOperation("doSpellingSuggestion",
"urn:GoogleSearch");
applyUserPreferences();
m_pCall->addParameter((void*)&Value0, "key", XSD_STRING);
m_pCall->addParameter((void*)&Value1, "phrase", XSD_STRING);
if (AXIS_SUCCESS == m_pCall->invoke())
{
if(AXIS_SUCCESS ==
m_pCall->checkMessage("doSpellingSuggestionResponse", "urn:GoogleSearch"))
{
Ret = m_pCall->getElementAsString("_return", 0);
}
}
updateStateAfterResponse();
m_pCall->unInitialize();
return Ret;
}
catch(AxisException& e)
{
int iExceptionCode = e.getExceptionCode();
if(AXISC_NODE_VALUE_MISMATCH_EXCEPTION != iExceptionCode)
{
updateStateAfterResponse();
m_pCall->unInitialize();
throw GoogleSearchService_AxisClientException(e.what());
}
ISoapFault* pSoapFault = (ISoapFault*)
m_pCall->checkFault("Fault","http://api.google.com/search/beta2" );
if(pSoapFault)
{
updateStateAfterResponse();
m_pCall->unInitialize();
throw
GoogleSearchService_AxisClientException(pSoapFault);
}
else throw;
}
}
/*
* This method wrap the service method doGoogleSearch
*/
GoogleSearchResult* GoogleSearchPort::doGoogleSearch(xsd__boolean Value0,
xsd__string Value1, xsd__string Value2, xsd__int Value3, xsd__string Value4,
xsd__boolean Value5, xsd__string Value6, xsd__int Value7, xsd__string Value8,
xsd__string Value9)
{
GoogleSearchResult* pReturn = NULL;
const char* pcCmplxFaultName;
try
{
if (AXIS_SUCCESS != m_pCall->initialize(CPP_RPC_PROVIDER,
NORMAL_CHANNEL))
return pReturn;
m_pCall->setTransportProperty(SOAPACTION_HEADER ,
"urn:GoogleSearchAction");
m_pCall->setSOAPVersion(SOAP_VER_1_1);
m_pCall->setOperation("doGoogleSearch", "urn:GoogleSearch");
applyUserPreferences();
// Krishna - The Order starting here has been modified to
make it work with Google
m_pCall->addParameter((void*)&Value1, "key", XSD_STRING);
m_pCall->addParameter((void*)&Value9, "q", XSD_STRING);
m_pCall->addParameter((void*)&Value3, "start", XSD_INT);
m_pCall->addParameter((void*)&Value7, "maxResults", XSD_INT);
m_pCall->addParameter((void*)&Value0, "filter", XSD_BOOLEAN);
m_pCall->addParameter((void*)&Value2, "restrict", XSD_STRING);
m_pCall->addParameter((void*)&Value5, "safeSearch",
XSD_BOOLEAN);
m_pCall->addParameter((void*)&Value6, "lr", XSD_STRING);
m_pCall->addParameter((void*)&Value4, "ie", XSD_STRING);
m_pCall->addParameter((void*)&Value8, "oe", XSD_STRING);
if (AXIS_SUCCESS == m_pCall->invoke())
{
if(AXIS_SUCCESS ==
m_pCall->checkMessage("doGoogleSearchResponse", "urn:GoogleSearch"))
{
pReturn =
(GoogleSearchResult*)m_pCall->getCmplxObject((void*)
Axis_DeSerialize_GoogleSearchResult, (void*) Axis_Create_GoogleSearchResult,
(void*) Axis_Delete_GoogleSearchResult,"_return", 0);
}
}
updateStateAfterResponse();
m_pCall->unInitialize();
return pReturn;
}
catch(AxisException& e)
{
int iExceptionCode = e.getExceptionCode();
if(AXISC_NODE_VALUE_MISMATCH_EXCEPTION != iExceptionCode)
{
updateStateAfterResponse();
m_pCall->unInitialize();
throw GoogleSearchService_AxisClientException(e.what());
}
ISoapFault* pSoapFault = (ISoapFault*)
m_pCall->checkFault("Fault","http://api.google.com/search/beta2" );
if(pSoapFault)
{
updateStateAfterResponse();
m_pCall->unInitialize();
throw
GoogleSearchService_AxisClientException(pSoapFault);
}
else throw;
}
}
int GoogleSearchPort::getFaultDetail(char** ppcDetail)
{
return m_pCall->getFaultDetail(ppcDetail);
}
/*
* This file was auto-generated by the Axis C++ Web Service Generator (WSDL2Ws)
* This file contains Client Stub Class for remote web service
*/
#if !defined(__GOOGLESEARCHPORT_CLIENTSTUB_H__INCLUDED_)
#define __GOOGLESEARCHPORT_CLIENTSTUB_H__INCLUDED_
#include <axis/client/Stub.hpp>
#include "GoogleSearchService_AxisClientException.hpp"
#include <axis/ISoapFault.hpp>
#include "GoogleSearchResult.hpp"
#include "DirectoryCategory_Array.hpp"
#include "ResultElement.hpp"
#include "DirectoryCategory.hpp"
#include "ResultElement_Array.hpp"
class GoogleSearchPort :public Stub
{
public:
STORAGE_CLASS_INFO GoogleSearchPort(const char* pchEndpointUri, AXIS_PROTOCOL_TYPE eProtocol=APTHTTP1_1);
STORAGE_CLASS_INFO GoogleSearchPort();
public:
STORAGE_CLASS_INFO virtual ~GoogleSearchPort();
public:
STORAGE_CLASS_INFO xsd__base64Binary doGetCachedPage(xsd__string Value0,xsd__string Value1);
STORAGE_CLASS_INFO xsd__string doSpellingSuggestion(xsd__string Value0,xsd__string Value1);
STORAGE_CLASS_INFO GoogleSearchResult* doGoogleSearch(xsd__boolean Value0,xsd__string Value1,xsd__string Value2,xsd__int Value3,xsd__string Value4,xsd__boolean Value5,xsd__string Value6,xsd__int Value7,xsd__string Value8,xsd__string Value9);
int getFaultDetail(char** ppcDetail);
};
#endif /* !defined(__GOOGLESEARCHPORT_CLIENTSTUB_H__INCLUDED_)*/
/*
* This file was auto-generated by the Axis C++ Web Service Generator (WSDL2Ws)
* This file contains functions to manipulate complex type GoogleSearchResult
*/
#include "GoogleSearchResult.hpp"
#include <axis/AxisWrapperAPI.hpp>
extern int Axis_DeSerialize_ResultElement(ResultElement* param, IWrapperSoapDeSerializer* pDZ);
extern void* Axis_Create_ResultElement(ResultElement* pObj, bool bArray = false, int nSize=0);
extern void Axis_Delete_ResultElement(ResultElement* param, bool bArray = false, int nSize=0);
extern int Axis_Serialize_ResultElement(ResultElement* param, IWrapperSoapSerializer* pSZ, bool bArray = false);
extern int Axis_GetSize_ResultElement();
extern int Axis_DeSerialize_DirectoryCategory(DirectoryCategory* param, IWrapperSoapDeSerializer* pDZ);
extern void* Axis_Create_DirectoryCategory(DirectoryCategory* pObj, bool bArray = false, int nSize=0);
extern void Axis_Delete_DirectoryCategory(DirectoryCategory* param, bool bArray = false, int nSize=0);
extern int Axis_Serialize_DirectoryCategory(DirectoryCategory* param, IWrapperSoapSerializer* pSZ, bool bArray = false);
extern int Axis_GetSize_DirectoryCategory();
/*
* This static method serialize a GoogleSearchResult type of object
*/
int Axis_Serialize_GoogleSearchResult(GoogleSearchResult* param, IWrapperSoapSerializer* pSZ, bool bArray = false)
{
if (bArray)
{
pSZ->serialize("<", Axis_TypeName_GoogleSearchResult, ">", NULL);
}
else
{
const AxisChar* sPrefix = pSZ->getNamespacePrefix(Axis_URI_GoogleSearchResult);
pSZ->serialize("<", Axis_TypeName_GoogleSearchResult, " xsi:type=\"", sPrefix, ":",
Axis_TypeName_GoogleSearchResult, "\" xmlns:", sPrefix, "=\"",
Axis_URI_GoogleSearchResult, "\">", NULL);
}
pSZ->serializeAsElement("documentFiltering", (void*)&(param->documentFiltering), XSD_BOOLEAN);
pSZ->serializeAsElement("searchComments", (void*)&(param->searchComments), XSD_STRING);
pSZ->serializeAsElement("estimatedTotalResultsCount", (void*)&(param->estimatedTotalResultsCount), XSD_INT);
pSZ->serializeAsElement("estimateIsExact", (void*)&(param->estimateIsExact), XSD_BOOLEAN);
pSZ->serializeCmplxArray((Axis_Array*)(¶m->resultElements),
(void*) Axis_Serialize_ResultElement, (void*) Axis_Delete_ResultElement, (void*) Axis_GetSize_ResultElement,
"resultElements", Axis_URI_ResultElement);
pSZ->serializeAsElement("searchQuery", (void*)&(param->searchQuery), XSD_STRING);
pSZ->serializeAsElement("startIndex", (void*)&(param->startIndex), XSD_INT);
pSZ->serializeAsElement("endIndex", (void*)&(param->endIndex), XSD_INT);
pSZ->serializeAsElement("searchTips", (void*)&(param->searchTips), XSD_STRING);
pSZ->serializeCmplxArray((Axis_Array*)(¶m->directoryCategories),
(void*) Axis_Serialize_DirectoryCategory, (void*) Axis_Delete_DirectoryCategory, (void*) Axis_GetSize_DirectoryCategory,
"directoryCategories", Axis_URI_DirectoryCategory);
pSZ->serializeAsElement("searchTime", (void*)&(param->searchTime), XSD_DOUBLE);
pSZ->serialize("</", Axis_TypeName_GoogleSearchResult, ">", NULL);
return AXIS_SUCCESS;
}
/*
* This static method deserialize a GoogleSearchResult type of object
*/
int Axis_DeSerialize_GoogleSearchResult(GoogleSearchResult* param, IWrapperSoapDeSerializer* pIWSDZ)
{
param->documentFiltering = pIWSDZ->getElementAsBoolean("documentFiltering",0);
param->searchComments = pIWSDZ->getElementAsString("searchComments",0);
param->estimatedTotalResultsCount = pIWSDZ->getElementAsInt("estimatedTotalResultsCount",0);
param->estimateIsExact = pIWSDZ->getElementAsBoolean("estimateIsExact",0);
param->resultElements = (ResultElement_Array&)pIWSDZ->getCmplxArray((void*)Axis_DeSerialize_ResultElement
, (void*)Axis_Create_ResultElement, (void*)Axis_Delete_ResultElement
, (void*)Axis_GetSize_ResultElement, "resultElements", Axis_URI_ResultElement);
param->searchQuery = pIWSDZ->getElementAsString("searchQuery",0);
param->startIndex = pIWSDZ->getElementAsInt("startIndex",0);
param->endIndex = pIWSDZ->getElementAsInt("endIndex",0);
param->searchTips = pIWSDZ->getElementAsString("searchTips",0);
param->directoryCategories = (DirectoryCategory_Array&)pIWSDZ->getCmplxArray((void*)Axis_DeSerialize_DirectoryCategory
, (void*)Axis_Create_DirectoryCategory, (void*)Axis_Delete_DirectoryCategory
, (void*)Axis_GetSize_DirectoryCategory, "directoryCategories", Axis_URI_DirectoryCategory);
param->searchTime = pIWSDZ->getElementAsDouble("searchTime",0);
return pIWSDZ->getStatus();
}
void* Axis_Create_GoogleSearchResult(GoogleSearchResult* pObj, bool bArray = false, int nSize=0)
{
if (bArray && (nSize > 0))
{
if (pObj)
{
GoogleSearchResult* pNew = new GoogleSearchResult[nSize];
memcpy(pNew, pObj, sizeof(GoogleSearchResult)*nSize/2);
memset(pObj, 0, sizeof(GoogleSearchResult)*nSize/2);
delete [] pObj;
return pNew;
}
else
{
return new GoogleSearchResult[nSize];
}
}
else
return new GoogleSearchResult;
}
/*
* This static method delete a GoogleSearchResult type of object
*/
void Axis_Delete_GoogleSearchResult(GoogleSearchResult* param, bool bArray = false, int nSize=0)
{
if (bArray)
{
delete [] param;
}
else
{
delete param;
}
}
/*
* This static method gives the size of GoogleSearchResult type of object
*/
int Axis_GetSize_GoogleSearchResult()
{
return sizeof(GoogleSearchResult);
}
GoogleSearchResult::GoogleSearchResult()
{
/*do not allocate memory to any pointer members here
because deserializer will allocate memory anyway. */
memset( &documentFiltering, 0, sizeof( xsd__boolean));
memset( &searchComments, 0, sizeof( xsd__string));
memset( &estimatedTotalResultsCount, 0, sizeof( xsd__int));
memset( &estimateIsExact, 0, sizeof( xsd__boolean));
resultElements.m_Array = 0;
resultElements.m_Size = 0;
memset( &searchQuery, 0, sizeof( xsd__string));
memset( &startIndex, 0, sizeof( xsd__int));
memset( &endIndex, 0, sizeof( xsd__int));
memset( &searchTips, 0, sizeof( xsd__string));
directoryCategories.m_Array = 0;
directoryCategories.m_Size = 0;
memset( &searchTime, 0, sizeof( xsd__double));
}
GoogleSearchResult::~GoogleSearchResult()
{
/*delete any pointer and array members here*/
delete [] ((ResultElement*)resultElements.m_Array);
delete [] ((DirectoryCategory*)directoryCategories.m_Array);
}
/*
* This file was auto-generated by the Axis C++ Web Service Generator (WSDL2Ws)
* This file contains functions to manipulate complex type GoogleSearchResult
*/
#if !defined(__GOOGLESEARCHRESULT_PARAM_H__INCLUDED_)
#define __GOOGLESEARCHRESULT_PARAM_H__INCLUDED_
#include <axis/AxisUserAPI.hpp>
AXIS_CPP_NAMESPACE_USE
#include "DirectoryCategory_Array.hpp"
#include "ResultElement.hpp"
#include "DirectoryCategory.hpp"
#include "ResultElement_Array.hpp"
/*Local name and the URI for the type*/
static const char* Axis_URI_GoogleSearchResult = "urn:GoogleSearch";
static const char* Axis_TypeName_GoogleSearchResult = "GoogleSearchResult";
class GoogleSearchResult
{
public:
xsd__boolean documentFiltering;
xsd__string searchComments;
xsd__int estimatedTotalResultsCount;
xsd__boolean estimateIsExact;
ResultElement_Array resultElements;
xsd__string searchQuery;
xsd__int startIndex;
xsd__int endIndex;
xsd__string searchTips;
DirectoryCategory_Array directoryCategories;
xsd__double searchTime;
GoogleSearchResult();
virtual ~GoogleSearchResult();
};
#endif /* !defined(__GOOGLESEARCHRESULT_PARAM_H__INCLUDED_)*/
/*
* This file was auto-generated by the Axis C++ Web Service Generator (WSDL2Ws)
* This file contains implementations of the GoogleSearchService Exception class of the web service.
*/
#include "GoogleSearchService_AxisClientException.hpp"
#include <axis/AxisWrapperAPI.hpp>
GoogleSearchService_AxisClientException::GoogleSearchService_AxisClientException()
{
/* This only serves the purpose of indicating that the
* service has thrown an excpetion
*/
m_iExceptionCode = AXISC_SERVICE_THROWN_EXCEPTION;
processException(m_iExceptionCode);
}
GoogleSearchService_AxisClientException::GoogleSearchService_AxisClientException(ISoapFault* pFault)
{
m_iExceptionCode = AXISC_SERVICE_THROWN_EXCEPTION;
m_pISoapFault = pFault;
processException(pFault);}
GoogleSearchService_AxisClientException::GoogleSearchService_AxisClientException(int iExceptionCode)
{
m_iExceptionCode = iExceptionCode;
processException (iExceptionCode);
}
GoogleSearchService_AxisClientException::GoogleSearchService_AxisClientException(exception* e)
{
processException (e);
}
GoogleSearchService_AxisClientException::GoogleSearchService_AxisClientException(exception* e,int iExceptionCode)
{
processException (e, iExceptionCode);
}
GoogleSearchService_AxisClientException::GoogleSearchService_AxisClientException(string sMessage)
{
m_sMessage =sMessage;
}
GoogleSearchService_AxisClientException::~GoogleSearchService_AxisClientException() throw ()
{
m_sMessage ="";
}
void GoogleSearchService_AxisClientException:: processException(exception* e, int iExceptionCode)
{
m_sMessage = getMessage (e) + getMessage (iExceptionCode);
}
void GoogleSearchService_AxisClientException::processException (ISoapFault* pFault)
{
/*User can do something like deserializing the struct into a string*/
}
void GoogleSearchService_AxisClientException::processException(exception* e)
{
m_sMessage = getMessage (e);
}
void GoogleSearchService_AxisClientException::processException(int iExceptionCode)
{
m_sMessage = getMessage (iExceptionCode);
}
const string GoogleSearchService_AxisClientException::getMessage (exception* objException)
{
string sMessage = objException->what();
return sMessage;
}
const string GoogleSearchService_AxisClientException::getMessage (int iExceptionCode)
{
string sMessage;
switch(iExceptionCode)
{
case AXISC_SERVICE_THROWN_EXCEPTION:
sMessage = "The GoogleSearchService service has thrown an exception. see details";
break;
default:
sMessage = "Unknown Exception has occured in the GoogleSearchService service";
}
return sMessage;
}
const char* GoogleSearchService_AxisClientException::what() throw ()
{
return m_sMessage.c_str ();
}
const int GoogleSearchService_AxisClientException::getExceptionCode(){
return m_iExceptionCode;
}
const ISoapFault* GoogleSearchService_AxisClientException::getFault(){
return m_pISoapFault;
}
/*
* This file was auto-generated by the Axis C++ Web Service Generator (WSDL2Ws)
* This file contains an Exception class of the web service.
*/
#if !defined(__AXISCLIENTEXCEPTION_EXCEPTION_H__INCLUDED_)
#define __AXISCLIENTEXCEPTION_EXCEPTION_H__INCLUDED_
#include <string>
#include <exception>
#include <axis/AxisException.hpp>
#include <axis/ISoapFault.hpp>
using namespace std;
AXIS_CPP_NAMESPACE_USE
class GoogleSearchService_AxisClientException: public AxisException
{
public:
STORAGE_CLASS_INFO GoogleSearchService_AxisClientException();
STORAGE_CLASS_INFO GoogleSearchService_AxisClientException(ISoapFault* pFault);
STORAGE_CLASS_INFO GoogleSearchService_AxisClientException(int iExceptionCode);
STORAGE_CLASS_INFO GoogleSearchService_AxisClientException(exception* e);
STORAGE_CLASS_INFO GoogleSearchService_AxisClientException(exception* e, int iExceptionCode);
STORAGE_CLASS_INFO GoogleSearchService_AxisClientException(string sMessage);
STORAGE_CLASS_INFO virtual ~GoogleSearchService_AxisClientException() throw();
STORAGE_CLASS_INFO const char* what() throw();
STORAGE_CLASS_INFO const int getExceptionCode();
STORAGE_CLASS_INFO const string getMessage(exception* e);
STORAGE_CLASS_INFO const string getMessage(int iExceptionCode);
STORAGE_CLASS_INFO const ISoapFault* getFault();
private:
void processException(exception* e);
void processException(ISoapFault* pFault);
void processException(exception* e, int iExceptionCode);
void processException(int iExceptionCode);
string m_sMessage;
int m_iExceptionCode;
ISoapFault* m_pISoapFault;
};
#endif /* !defined(__AXISCLIENTEXCEPTION_EXCEPTION_H__INCLUDED_)*/
/*
* This file was auto-generated by the Axis C++ Web Service Generator (WSDL2Ws)
* This file contains functions to manipulate complex type ResultElement
*/
#include "ResultElement.hpp"
#include <axis/AxisWrapperAPI.hpp>
extern int Axis_DeSerialize_DirectoryCategory(DirectoryCategory* param, IWrapperSoapDeSerializer* pDZ);
extern void* Axis_Create_DirectoryCategory(DirectoryCategory* pObj, bool bArray = false, int nSize=0);
extern void Axis_Delete_DirectoryCategory(DirectoryCategory* param, bool bArray = false, int nSize=0);
extern int Axis_Serialize_DirectoryCategory(DirectoryCategory* param, IWrapperSoapSerializer* pSZ, bool bArray = false);
extern int Axis_GetSize_DirectoryCategory();
/*
* This static method serialize a ResultElement type of object
*/
int Axis_Serialize_ResultElement(ResultElement* param, IWrapperSoapSerializer* pSZ, bool bArray = false)
{
if (bArray)
{
pSZ->serialize("<", Axis_TypeName_ResultElement, ">", NULL);
}
else
{
const AxisChar* sPrefix = pSZ->getNamespacePrefix(Axis_URI_ResultElement);
pSZ->serialize("<", Axis_TypeName_ResultElement, " xsi:type=\"", sPrefix, ":",
Axis_TypeName_ResultElement, "\" xmlns:", sPrefix, "=\"",
Axis_URI_ResultElement, "\">", NULL);
}
pSZ->serializeAsElement("summary", (void*)&(param->summary), XSD_STRING);
pSZ->serializeAsElement("URL", (void*)&(param->URL), XSD_STRING);
pSZ->serializeAsElement("snippet", (void*)&(param->snippet), XSD_STRING);
pSZ->serializeAsElement("title", (void*)&(param->title), XSD_STRING);
pSZ->serializeAsElement("cachedSize", (void*)&(param->cachedSize), XSD_STRING);
pSZ->serializeAsElement("relatedInformationPresent", (void*)&(param->relatedInformationPresent), XSD_BOOLEAN);
pSZ->serializeAsElement("hostName", (void*)&(param->hostName), XSD_STRING);
Axis_Serialize_DirectoryCategory(param->directoryCategory, pSZ);
pSZ->serializeAsElement("directoryTitle", (void*)&(param->directoryTitle), XSD_STRING);
pSZ->serialize("</", Axis_TypeName_ResultElement, ">", NULL);
return AXIS_SUCCESS;
}
/*
* This static method deserialize a ResultElement type of object
*/
int Axis_DeSerialize_ResultElement(ResultElement* param, IWrapperSoapDeSerializer* pIWSDZ)
{
param->summary = pIWSDZ->getElementAsString("summary",0);
param->URL = pIWSDZ->getElementAsString("URL",0);
param->snippet = pIWSDZ->getElementAsString("snippet",0);
param->title = pIWSDZ->getElementAsString("title",0);
param->cachedSize = pIWSDZ->getElementAsString("cachedSize",0);
param->relatedInformationPresent = pIWSDZ->getElementAsBoolean("relatedInformationPresent",0);
param->hostName = pIWSDZ->getElementAsString("hostName",0);
param->directoryCategory = (DirectoryCategory*)pIWSDZ->getCmplxObject((void*)Axis_DeSerialize_DirectoryCategory
, (void*)Axis_Create_DirectoryCategory, (void*)Axis_Delete_DirectoryCategory
, "directoryCategory", Axis_URI_DirectoryCategory);
param->directoryTitle = pIWSDZ->getElementAsString("directoryTitle",0);
return pIWSDZ->getStatus();
}
void* Axis_Create_ResultElement(ResultElement* pObj, bool bArray = false, int nSize=0)
{
if (bArray && (nSize > 0))
{
if (pObj)
{
ResultElement* pNew = new ResultElement[nSize];
memcpy(pNew, pObj, sizeof(ResultElement)*nSize/2);
memset(pObj, 0, sizeof(ResultElement)*nSize/2);
delete [] pObj;
return pNew;
}
else
{
return new ResultElement[nSize];
}
}
else
return new ResultElement;
}
/*
* This static method delete a ResultElement type of object
*/
void Axis_Delete_ResultElement(ResultElement* param, bool bArray = false, int nSize=0)
{
if (bArray)
{
delete [] param;
}
else
{
delete param;
}
}
/*
* This static method gives the size of ResultElement type of object
*/
int Axis_GetSize_ResultElement()
{
return sizeof(ResultElement);
}
ResultElement::ResultElement()
{
/*do not allocate memory to any pointer members here
because deserializer will allocate memory anyway. */
memset( &summary, 0, sizeof( xsd__string));
memset( &URL, 0, sizeof( xsd__string));
memset( &snippet, 0, sizeof( xsd__string));
memset( &title, 0, sizeof( xsd__string));
memset( &cachedSize, 0, sizeof( xsd__string));
memset( &relatedInformationPresent, 0, sizeof( xsd__boolean));
memset( &hostName, 0, sizeof( xsd__string));
directoryCategory=0;
memset( &directoryTitle, 0, sizeof( xsd__string));
}
ResultElement::~ResultElement()
{
/*delete any pointer and array members here*/
delete directoryCategory;
}
/*
* This file was auto-generated by the Axis C++ Web Service Generator (WSDL2Ws)
* This file contains functions to manipulate complex type ResultElement
*/
#if !defined(__RESULTELEMENT_PARAM_H__INCLUDED_)
#define __RESULTELEMENT_PARAM_H__INCLUDED_
#include <axis/AxisUserAPI.hpp>
AXIS_CPP_NAMESPACE_USE
#include "DirectoryCategory.hpp"
/*Local name and the URI for the type*/
static const char* Axis_URI_ResultElement = "urn:GoogleSearch";
static const char* Axis_TypeName_ResultElement = "ResultElement";
class DirectoryCategory;
class ResultElement
{
public:
xsd__string summary;
xsd__string URL;
xsd__string snippet;
xsd__string title;
xsd__string cachedSize;
xsd__boolean relatedInformationPresent;
xsd__string hostName;
DirectoryCategory* directoryCategory;
xsd__string directoryTitle;
ResultElement();
virtual ~ResultElement();
};
#endif /* !defined(__RESULTELEMENT_PARAM_H__INCLUDED_)*/
/*
* This file was auto-generated by the Axis C++ Web Service Generator (WSDL2Ws)
* This file contains functions to manipulate complex type ResultElement_Array
*/
#if !defined(__RESULTELEMENT_ARRAY_ARRAY_H__INCLUDED_)
#define __RESULTELEMENT_ARRAY_ARRAY_H__INCLUDED_
class ResultElement;
typedef struct ResultElement_ArrayTag
{
ResultElement* m_Array;
int m_Size;
} ResultElement_Array;
#endif /* !defined(__RESULTELEMENT_ARRAY_ARRAY_H__INCLUDED_)*/
g++ *.cpp -ggdb -I$AXISCPP_HOME/include -L$AXISCPP_DEPLOY/lib -ldl -laxiscpp_client -oGClient
POST /search/beta2 HTTP/1.1 Host: api.google.com:80 Content-Type: text/xml; charset=UTF-8 SOAPAction: "urn:GoogleSearchAction" Content-Length: 784 <?xml version='1.0' encoding='utf-8' ?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <SOAP-ENV:Body> <ns1:doGoogleSearch xmlns:ns1="urn:GoogleSearch"> <filter xsi:type="xsd:boolean">true</filter> <key xsi:type="xsd:string">**********CENSORED**********</key> <restrict xsi:type="xsd:string">no</restrict> <start xsi:type="xsd:int">1</start> <ie xsi:type="xsd:string">utf</ie> <safeSearch xsi:type="xsd:boolean">false</safeSearch> <lr xsi:type="xsd:string">blank</lr> <maxResults xsi:type="xsd:int">3</maxResults> <oe xsi:type="xsd:string">blank</oe> <q xsi:type="xsd:string">LAC UIC</q> </ns1:doGoogleSearch> </SOAP-ENV:Body> </SOAP-ENV:Envelope> HTTP/1.1 500 Internal Server Error Content-Type: text/xml; charset=utf-8 Cache-control: private Transfer-Encoding: chunked Date: Wed, 09 Mar 2005 00:19:41 GMT Server: GFE/1.3 Cneonction: Close 6b9 <?xml version='1.0' encoding='UTF-8'?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema"> <SOAP-ENV:Body> <SOAP-ENV:Fault> <faultcode>SOAP-ENV:Server</faultcode> <faultstring>Exception while handling service request: com.google.soap.search.GoogleSearchService.doGoogleSearch(boolean,java.lang.String,java.lang.String,int,java.lang.String,boolean,java.lang.String,int,java.lang.String,java.lang.String) -- no signature match</faultstring> <faultactor>/search/beta2</faultactor> <detail> <stackTrace>java.lang.NoSuchMethodException: com.google.soap.search.GoogleSearchService.doGoogleSearch(boolean,java.lang.String,java.lang.String,int,java.lang.String,boolean,java.lang.String,int,java.lang.String,java.lang.String) -- no signature match .at org.apache.soap.util.MethodUtils.getEntryPoint(MethodUtils.java:194) .at org.apache.soap.util.MethodUtils.getMethod(MethodUtils.java:548) .at org.apache.soap.util.MethodUtils.getMethod(MethodUtils.java:528) .at org.apache.soap.server.RPCRouter.invoke(RPCRouter.java:114) .at org.apache.soap.providers.RPCJavaProvider.invoke(RPCJavaProvider.java:129) .at org.apache.soap.server.http.RPCRouterServlet.doPost(RPCRouterServlet.java:288) .at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) .at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) .at com.google.gse.HttpConnection.runServlet(HttpConnection.java:237) .at com.google.gse.HttpConnection.run(HttpConnection.java:195) .at com.google.gse.DispatchQueue$WorkerThread.run(DispatchQueue.java:201) </stackTrace> </detail> </SOAP-ENV:Fault> </SOAP-ENV:Body> </SOAP-ENV:Envelope> 0
POST /search/beta2 HTTP/1.1 Host: api.google.com:80 Content-Type: text/xml; charset=UTF-8 SOAPAction: "urn:GoogleSearchAction" Content-Length: 784 <?xml version='1.0' encoding='utf-8' ?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <SOAP-ENV:Body> <ns1:doGoogleSearch xmlns:ns1="urn:GoogleSearch"> <key xsi:type="xsd:string">*********CENSORED******</key> <q xsi:type="xsd:string">LAC UIC</q> <start xsi:type="xsd:int">1</start> <maxResults xsi:type="xsd:int">3</maxResults> <filter xsi:type="xsd:boolean">true</filter> <restrict xsi:type="xsd:string">no</restrict> <safeSearch xsi:type="xsd:boolean">false</safeSearch> <lr xsi:type="xsd:string">blank</lr> <ie xsi:type="xsd:string">utf</ie> <oe xsi:type="xsd:string">blank</oe> </ns1:doGoogleSearch> </SOAP-ENV:Body> </SOAP-ENV:Envelope> HTTP/1.1 200 OK Content-Type: text/xml; charset=utf-8 Cache-control: private Transfer-Encoding: chunked Date: Wed, 09 Mar 2005 00:39:40 GMT Server: GFE/1.3 1055 <?xml version='1.0' encoding='UTF-8'?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema"> <SOAP-ENV:Body> <ns1:doGoogleSearchResponse xmlns:ns1="urn:GoogleSearch" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <return xsi:type="ns1:GoogleSearchResult"> <directoryCategories xmlns:ns2="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:Array" ns2:arrayType="ns1:DirectoryCategory[0]"> </directoryCategories> <documentFiltering xsi:type="xsd:boolean">true</documentFiltering> <endIndex xsi:type="xsd:int">4</endIndex> <estimateIsExact xsi:type="xsd:boolean">false</estimateIsExact> <estimatedTotalResultsCount xsi:type="xsd:int">1950</estimatedTotalResultsCount> <resultElements xmlns:ns3="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns3:Array" ns3:arrayType="ns1:ResultElement[3]"> <item xsi:type="ns1:ResultElement"> <URL xsi:type="xsd:string">http://www.lac.uic.edu/~grossman/</URL> <cachedSize xsi:type="xsd:string">7k</cachedSize> <directoryCategory xsi:type="ns1:DirectoryCategory"> <fullViewableName xsi:type="xsd:string"></fullViewableName> <specialEncoding xsi:type="xsd:string"></specialEncoding> </directoryCategory> <directoryTitle xsi:type="xsd:string"></directoryTitle> <hostName xsi:type="xsd:string">www.lac.uic.edu</hostName> <relatedInformationPresent xsi:type="xsd:boolean">true</relatedInformationPresent> <snippet xsi:type="xsd:string"><b>...</b> I am the Director of the Laboratory for Advanced Computing (<b>LAC</b>) and the<br> National Center for Data Mining (NCDM) at <b>UIC</b>. I am also <b>...</b> </snippet> <summary xsi:type="xsd:string"></summary> <title xsi:type="xsd:string">Robert Grossman <b>LAC</b> Home Page</title> </item> <item xsi:type="ns1:ResultElement"> <URL xsi:type="xsd:string">http://131.193.181.142/staff.htm</URL> <cachedSize xsi:type="xsd:string">9k</cachedSize> <directoryCategory xsi:type="ns1:DirectoryCategory"> <fullViewableName xsi:type="xsd:string"></fullViewableName> <specialEncoding xsi:type="xsd:string"></specialEncoding> </directoryCategory> <directoryTitle xsi:type="xsd:string"></directoryTitle> <hostName xsi:type="xsd:string"></hostName> <relatedInformationPresent xsi:type="xsd:boolean">true</relatedInformationPresent> <snippet xsi:type="xsd:string"><b>...</b> Shirley Connelly shirley@<b>lac</b>.<b>uic</b>.edu Associate Director, Laboratory for Advanced<br> Computing 715 Science and Engineering Offices Office: (312) 413-2176. <b>...</b> </snippet> <summary xsi:type="xsd:string"></summary> <title xsi:type="xsd:string">DataSpace</title> </item> <item xsi:type="ns1:ResultElement"> <URL xsi:type="xsd:string">http://www.usatlas.bnl.gov/computing/mgmt/lhccp/henpnet/FirstMeeting/HiNetThru.ppt</URL> <cachedSize xsi:type="xsd:string"></cachedSize> <directoryCategory xsi:type="ns1:DirectoryCategory"> <fullViewableName xsi:type="xsd:string"></fullViewableName> <specialEncoding xsi:type="xsd:string"></specialEncoding> </directoryCategory> <directoryTitle xsi:type="xsd:string"></directoryTitle> <hostName xsi:type="xsd:string"></hostName> <relatedInformationPresent xsi:type="xsd:boolean">true</relatedInformationPresent> <snippet xsi:type="xsd:string"><b>...</b> www.<b>lac</b>.<b>uic</b>.edu. University of Illinois at Chicago. <b>...</b> Netwk Cisco 6509 w/ 10GigE<br> for <b>LAC</b>; 10Gb testing gear; (2) 10Gb boards for <b>UIC</b>, <b>LAC</b>. <b>...</b> </snippet> <summary xsi:type="xsd:string"></summary> <title xsi:type="xsd:string"></title> </item> </resultElements> <searchComments xsi:type="xsd:string"></searchComments> <searchQuery xsi:type="xsd:string">LAC UIC</searchQuery> <searchTime xsi:type="xsd:double">0.476858</searchTime> <searchTips xsi:type="xsd:string"></searchTips> <startIndex xsi:type="xsd:int">2</startIndex> </return> </ns1:doGoogleSearchResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope> 0
