This time with attachments -----Ursprüngliche Nachricht----- Von: Franz Fehringer [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 3. Januar 2006 15:02 An: axis-c-user; Apache AXIS C Developers List Betreff: recent wsdl2ws generates wrong/inconsistent prototypes
Hello, With the latest SVN code i observe the following problem not present in the AxisC 1.5 release: Using the attached WSDL method prototypes differ between header (.hpp) and source (.cpp) (also attached to this mail). More specifically, the input parameters are declared inconsistent, the output parameters consistent. The header reads void Login(t_Expiry Value0, t_Language Value1, t_PositiveInt Value2, t_Authentication* Value3, AXIS_OUT_PARAM t_Expiry ** OutValue0, AXIS_OUT_PARAM t_SessionToken ** OutValue1); The source reads void SessionManagementPortType::Login(xsd__int* Value0, xsd__string Value1, xsd__int* Value2, t_Authentication* Value3, AXIS_OUT_PARAM t_Expiry ** OutValue0, AXIS_OUT_PARAM t_SessionToken ** OutValue1) First in the header file for the input parameters typedefed types (t_Expiry ...) are used but typedefed to types (xsd__int ...) in the source file (maybe a cosmetic glitch but nevertheless not desirable). Second and more seriously the levels of indirection differ: With typedef xsd__int t_Expiry; typedef xsd__string t_Language; typedef xsd__int t_PositiveInt; the first parameter Value0 (for example) is an integer in the header but a pointer in the source. There is also an issue with the output parameters: OutValue1 is a t_SessionToken** in current SVN but a t_SessionToken* in release 1.5. Should i file a JIRA issue for this problem(s)? Greetings Franz Dr. Franz Fehringer (Dipl. Math.) ____________________________________ ISO Software Systeme Eichendorffstrasse 29 90491 Nürnberg Deutschland Tel. : +49/(911) - 99594-0 Fax : +49/(911) - 99594-580 mailto:[EMAIL PROTECTED] http://www.isogmbh.de
durchstich.wsdl
Description: application/xml
durchstich.xsd
Description: application/xml
/*
* 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(__SESSIONMANAGEMENTPORTTYPE_CLIENTSTUB_H__INCLUDED_)
#define __SESSIONMANAGEMENTPORTTYPE_CLIENTSTUB_H__INCLUDED_
#include <axis/client/Stub.hpp>
#include <axis/OtherFaultException.hpp>
#include <axis/ISoapAttachment.hpp>
#include <axis/ISoapFault.hpp>
AXIS_CPP_NAMESPACE_USE
#include "t_Description.hpp"
#include "t_Error_Array.hpp"
#include "t_Language.hpp"
#include "t_ErrorResponse.hpp"
#include "t_Authentication.hpp"
#include "t_EmptyComplex.hpp"
#include "t_LoginResponse.hpp"
#include "t_Error.hpp"
#include "t_Warning.hpp"
#include "t_PositiveInt.hpp"
#include "t_SessionToken.hpp"
#include "t_UserName.hpp"
#include "t_LoginRequest.hpp"
#include "t_Password.hpp"
#include "t_Empty.hpp"
#include "t_Expiry.hpp"
class SessionManagementPortType :public Stub
{
public:
STORAGE_CLASS_INFO SessionManagementPortType(const char*
pchEndpointUri, AXIS_PROTOCOL_TYPE eProtocol=APTHTTP1_1);
STORAGE_CLASS_INFO SessionManagementPortType();
public:
STORAGE_CLASS_INFO virtual ~SessionManagementPortType();
public:
STORAGE_CLASS_INFO void Login(t_Expiry Value0, t_Language Value1,
t_PositiveInt Value2, t_Authentication* Value3, AXIS_OUT_PARAM t_Expiry **
OutValue0, AXIS_OUT_PARAM t_SessionToken ** OutValue1);
STORAGE_CLASS_INFO void Logout();
};
#endif /* !defined(__SESSIONMANAGEMENTPORTTYPE_CLIENTSTUB_H__INCLUDED_)*/
/*
* This file was auto-generated by the Axis C++ Web Service Generator (WSDL2Ws)
* This file contains Client Stub implementation for remote web service.
*/
#include "SessionManagementPortType.hpp"
#include <axis/AxisWrapperAPI.hpp>
#include <axis/Axis.hpp>
extern int Axis_DeSerialize_t_Description(t_Description* param,
IWrapperSoapDeSerializer* pDZ);
extern void* Axis_Create_t_Description(t_Description *Obj, bool bArray = false,
int nSize=0);
extern void Axis_Delete_t_Description(t_Description* param, bool bArray =
false, int nSize=0);
extern int Axis_Serialize_t_Description(t_Description* param,
IWrapperSoapSerializer* pSZ, bool bArray = false);
extern int Axis_GetSize_t_Description();
extern int Axis_DeSerialize_t_LoginResponse(t_LoginResponse* param,
IWrapperSoapDeSerializer* pDZ);
extern void* Axis_Create_t_LoginResponse(t_LoginResponse *Obj, bool bArray =
false, int nSize=0);
extern void Axis_Delete_t_LoginResponse(t_LoginResponse* param, bool bArray =
false, int nSize=0);
extern int Axis_Serialize_t_LoginResponse(t_LoginResponse* param,
IWrapperSoapSerializer* pSZ, bool bArray = false);
extern int Axis_GetSize_t_LoginResponse();
extern int Axis_DeSerialize_t_EmptyComplex(t_EmptyComplex* param,
IWrapperSoapDeSerializer* pDZ);
extern void* Axis_Create_t_EmptyComplex(t_EmptyComplex *Obj, bool bArray =
false, int nSize=0);
extern void Axis_Delete_t_EmptyComplex(t_EmptyComplex* param, bool bArray =
false, int nSize=0);
extern int Axis_Serialize_t_EmptyComplex(t_EmptyComplex* param,
IWrapperSoapSerializer* pSZ, bool bArray = false);
extern int Axis_GetSize_t_EmptyComplex();
extern int Axis_DeSerialize_t_Error(t_Error* param, IWrapperSoapDeSerializer*
pDZ);
extern void* Axis_Create_t_Error(t_Error *Obj, bool bArray = false, int
nSize=0);
extern void Axis_Delete_t_Error(t_Error* param, bool bArray = false, int
nSize=0);
extern int Axis_Serialize_t_Error(t_Error* param, IWrapperSoapSerializer* pSZ,
bool bArray = false);
extern int Axis_GetSize_t_Error();
extern int Axis_DeSerialize_t_Warning(t_Warning* param,
IWrapperSoapDeSerializer* pDZ);
extern void* Axis_Create_t_Warning(t_Warning *Obj, bool bArray = false, int
nSize=0);
extern void Axis_Delete_t_Warning(t_Warning* param, bool bArray = false, int
nSize=0);
extern int Axis_Serialize_t_Warning(t_Warning* param, IWrapperSoapSerializer*
pSZ, bool bArray = false);
extern int Axis_GetSize_t_Warning();
extern int Axis_DeSerialize_t_ErrorResponse(t_ErrorResponse* param,
IWrapperSoapDeSerializer* pDZ);
extern void* Axis_Create_t_ErrorResponse(t_ErrorResponse *Obj, bool bArray =
false, int nSize=0);
extern void Axis_Delete_t_ErrorResponse(t_ErrorResponse* param, bool bArray =
false, int nSize=0);
extern int Axis_Serialize_t_ErrorResponse(t_ErrorResponse* param,
IWrapperSoapSerializer* pSZ, bool bArray = false);
extern int Axis_GetSize_t_ErrorResponse();
extern int Axis_DeSerialize_t_LoginRequest(t_LoginRequest* param,
IWrapperSoapDeSerializer* pDZ);
extern void* Axis_Create_t_LoginRequest(t_LoginRequest *Obj, bool bArray =
false, int nSize=0);
extern void Axis_Delete_t_LoginRequest(t_LoginRequest* param, bool bArray =
false, int nSize=0);
extern int Axis_Serialize_t_LoginRequest(t_LoginRequest* param,
IWrapperSoapSerializer* pSZ, bool bArray = false);
extern int Axis_GetSize_t_LoginRequest();
extern int Axis_DeSerialize_t_Authentication(t_Authentication* param,
IWrapperSoapDeSerializer* pDZ);
extern void* Axis_Create_t_Authentication(t_Authentication *Obj, bool bArray =
false, int nSize=0);
extern void Axis_Delete_t_Authentication(t_Authentication* param, bool bArray =
false, int nSize=0);
extern int Axis_Serialize_t_Authentication(t_Authentication* param,
IWrapperSoapSerializer* pSZ, bool bArray = false);
extern int Axis_GetSize_t_Authentication();
SessionManagementPortType::SessionManagementPortType(const char* pcEndpointUri,
AXIS_PROTOCOL_TYPE eProtocol):Stub(pcEndpointUri, eProtocol)
{
}
SessionManagementPortType::SessionManagementPortType()
:Stub(" ", APTHTTP1_1)
{
m_pCall->setEndpointURI("https://prod.pegstour.com/api/soap/");
}
SessionManagementPortType::~SessionManagementPortType()
{
}
/*Methods corresponding to the web service methods*/
/*
* This method wrap the service methodLogin
*/
void SessionManagementPortType::Login(xsd__int* Value0, xsd__string Value1,
xsd__int* Value2, t_Authentication* Value3, AXIS_OUT_PARAM t_Expiry **
OutValue0, AXIS_OUT_PARAM t_SessionToken ** OutValue1)
{
const char* pcCmplxFaultName;
pcCmplxFaultName = NULL;
try
{ if (AXIS_SUCCESS != m_pCall->initialize(CPP_DOC_PROVIDER))
return ;
if (NULL==m_pCall->getTransportProperty("SOAPAction",false))
{
m_pCall->setTransportProperty(SOAPACTION_HEADER , "#Login");
}
m_pCall->setSOAPVersion(SOAP_VER_1_1);
m_pCall->setOperation("LoginRequest",
"http://www.pegs-pegstour.com/API/XMLSchema/1.0.1");
includeSecure();
applyUserPreferences();
if (Value0 != NULL)
{
char cPrefixAndParamName0[16];
sprintf( cPrefixAndParamName0, "%s:Expiry",
m_pCall->getNamespacePrefix("http://www.pegs-pegstour.com/API/XMLSchema/1.0.1"));
m_pCall->addParameter((void*)Value0, cPrefixAndParamName0, XSD_INT);
}
if (Value1 != NULL)
{
char cPrefixAndParamName1[18];
sprintf( cPrefixAndParamName1, "%s:Language",
m_pCall->getNamespacePrefix("http://www.pegs-pegstour.com/API/XMLSchema/1.0.1"));
m_pCall->addParameter((void*)Value1, cPrefixAndParamName1, XSD_STRING);
}
if (Value2 != NULL)
{
char cPrefixAndParamName2[15];
sprintf( cPrefixAndParamName2, "%s:Lives",
m_pCall->getNamespacePrefix("http://www.pegs-pegstour.com/API/XMLSchema/1.0.1"));
m_pCall->addParameter((void*)Value2, cPrefixAndParamName2, XSD_INT);
}
char cPrefixAndParamName3[24];
sprintf( cPrefixAndParamName3, "%s:Authentication",
m_pCall->getNamespacePrefix("http://www.pegs-pegstour.com/API/XMLSchema/1.0.1"));
m_pCall->addCmplxParameter(Value3,
(void*)Axis_Serialize_t_Authentication, (void*)Axis_Delete_t_Authentication,
cPrefixAndParamName3, Axis_URI_t_Authentication);
if (AXIS_SUCCESS == m_pCall->invoke())
{
if(AXIS_SUCCESS == m_pCall->checkMessage("LoginResponse",
"http://www.pegs-pegstour.com/API/XMLSchema/1.0.1"))
{
xsd__int * pReturn0 = m_pCall->getElementAsInt(
"Expiry", 0);
if( pReturn0 != NULL && OutValue0 != NULL)
{
*OutValue0 = *pReturn0;
}
Axis::AxisDelete( (void *) pReturn0, XSD_INT);
xsd__string pReturn1 = m_pCall->getElementAsString(
"SessionToken", 0);
if( pReturn1 != NULL && OutValue1 != NULL)
{
if( *OutValue1 != NULL)
{
int iStringSize1 = strlen( (char *)
*OutValue1);
int iStrLenValue1 = strlen(
pReturn1);
if( iStrLenValue1 > iStringSize1)
{
*OutValue1 =(t_SessionToken *)
new char[iStrLenValue1 + 1];
strcpy( (char *) *OutValue1,
pReturn1);
}
else
{
strcpy( (char *) *OutValue1,
pReturn1);
}
}
else
{
*OutValue1 = (t_SessionToken *) new
char[strlen( pReturn1) + 1];
strcpy( (char *) *OutValue1, pReturn1);
}
}
Axis::AxisDelete( (void *) pReturn1, XSD_STRING);
}
}
m_pCall->unInitialize();
}
catch(AxisException& e)
{
int iExceptionCode = e.getExceptionCode();
if(AXISC_NODE_VALUE_MISMATCH_EXCEPTION != iExceptionCode)
{
m_pCall->unInitialize();
throw;
}
ISoapFault* pSoapFault = (ISoapFault*)
m_pCall->checkFault("Fault","https://prod.pegstour.com/api/soap/" );
if(pSoapFault)
{
pcCmplxFaultName =
pSoapFault->getCmplxFaultObjectName();
if(0 == strcmp("LoginFault", pcCmplxFaultName))
{
t_ErrorResponse* pFaultDetail =
(t_ErrorResponse*)pSoapFault->getCmplxFaultObject(
(void*)
Axis_DeSerialize_t_ErrorResponse,
(void*)
Axis_Create_t_ErrorResponse,
(void*)
Axis_Delete_t_ErrorResponse,
"LoginFault",
0);
pFaultDetail->setFaultCode(pSoapFault->getFaultcode());
pFaultDetail->setFaultString(pSoapFault->getFaultstring());
pFaultDetail->setFaultActor(pSoapFault->getFaultactor());
pFaultDetail->setExceptionCode(e.getExceptionCode());
m_pCall->unInitialize();
delete pSoapFault;
throw *pFaultDetail;
}
else
{
const char *detail =
pSoapFault->getSimpleFaultDetail();
bool deleteDetail=false;
if (NULL==detail || 0==strlen(detail))
{
detail=m_pCall->getFaultAsXMLString();
if (NULL==detail)
{
detail="";
}
else
{
deleteDetail=true;
}
}
OtherFaultException
ofe(pSoapFault->getFaultcode(),
pSoapFault->getFaultstring(),
pSoapFault->getFaultactor(),
detail, iExceptionCode);
if (deleteDetail && NULL!=detail)
{
delete [] const_cast<char*>(detail);
}
m_pCall->unInitialize();
delete pSoapFault;
throw ofe;
}
}
else
{
m_pCall->unInitialize();
delete pSoapFault;
throw;
}
}
}
/*
* This method wrap the service methodLogout
*/
void SessionManagementPortType::Logout()
{
const char* pcCmplxFaultName;
pcCmplxFaultName = NULL;
try
{ if (AXIS_SUCCESS != m_pCall->initialize(CPP_DOC_PROVIDER))
return ;
if (NULL==m_pCall->getTransportProperty("SOAPAction",false))
{
m_pCall->setTransportProperty(SOAPACTION_HEADER , "#Logout");
}
m_pCall->setSOAPVersion(SOAP_VER_1_1);
m_pCall->setOperation("LogoutRequest",
"http://www.pegs-pegstour.com/API/XMLSchema/1.0.1");
includeSecure();
applyUserPreferences();
if (AXIS_SUCCESS == m_pCall->invoke())
{
if(AXIS_SUCCESS == m_pCall->checkMessage("LogoutResponse",
"http://www.pegs-pegstour.com/API/XMLSchema/1.0.1"))
{
/*not successful*/
}
}
m_pCall->unInitialize();
}
catch(AxisException& e)
{
int iExceptionCode = e.getExceptionCode();
if(AXISC_NODE_VALUE_MISMATCH_EXCEPTION != iExceptionCode)
{
m_pCall->unInitialize();
throw;
}
ISoapFault* pSoapFault = (ISoapFault*)
m_pCall->checkFault("Fault","https://prod.pegstour.com/api/soap/" );
if(pSoapFault)
{
pcCmplxFaultName =
pSoapFault->getCmplxFaultObjectName();
if(0 == strcmp("LogoutFault", pcCmplxFaultName))
{
t_ErrorResponse* pFaultDetail =
(t_ErrorResponse*)pSoapFault->getCmplxFaultObject(
(void*)
Axis_DeSerialize_t_ErrorResponse,
(void*)
Axis_Create_t_ErrorResponse,
(void*)
Axis_Delete_t_ErrorResponse,
"LogoutFault",
0);
pFaultDetail->setFaultCode(pSoapFault->getFaultcode());
pFaultDetail->setFaultString(pSoapFault->getFaultstring());
pFaultDetail->setFaultActor(pSoapFault->getFaultactor());
pFaultDetail->setExceptionCode(e.getExceptionCode());
m_pCall->unInitialize();
delete pSoapFault;
throw *pFaultDetail;
}
else
{
const char *detail =
pSoapFault->getSimpleFaultDetail();
bool deleteDetail=false;
if (NULL==detail || 0==strlen(detail))
{
detail=m_pCall->getFaultAsXMLString();
if (NULL==detail)
{
detail="";
}
else
{
deleteDetail=true;
}
}
OtherFaultException
ofe(pSoapFault->getFaultcode(),
pSoapFault->getFaultstring(),
pSoapFault->getFaultactor(),
detail, iExceptionCode);
if (deleteDetail && NULL!=detail)
{
delete [] const_cast<char*>(detail);
}
m_pCall->unInitialize();
delete pSoapFault;
throw ofe;
}
}
else
{
m_pCall->unInitialize();
delete pSoapFault;
throw;
}
}
}
