Guest_imported
New member
- Jan 1, 1970
- 0
Hi,
I am using TAO1.1a for CORBA and in the implementaion class I am having a function that return a sequence of structure. I am getting "Debug Assertion failed" on the server side when I try to run the client.
This is the code snippet which throws error. can anybody help me to resolve?
---begin of test_i.cpp------
#include "test_i.h"
#include <ace/streams.h>
.
.
.
test::seqinputData* test_testInterface_i::getStructure (
const test::AttribList & inputAttributes
)
ACE_THROW_SPEC ((
CORBA::SystemException
))
{
listfo *fostruct;
.
.
.
test::seqinputData_var folderOutput = new test::seqinputData(0);
fostruct = callamethod();
.
.
.
while(fostruct != NULL)
{
test::AttribList_var fo = new test::AttribList;
fo->ObjName = fostruct->m_Name;
fo->Folder = fostruct->m_FolderName;
fo->Revision = fostruct->m_Revision;
folderOutput -> length(folderOutput -> length() + 1);
(folderOutput)[folderOutput -> length() - 1] = fo;
/*Print the PIV list-name,revision*/
printf("%s\t%s\t%s \n", fostruct->m_Name, fostruct->m_FolderName,fostruct->m_Revision) ;
fostruct = fostruct->m_NextPtr;
}
return folderOutput._retn();
}
.
.
.
-------end of test_i.cpp--------
The IDL is defined like this
-------begin of idl-------
module test{
typedef struct Attributes {
string ObjName;
string Revision;
string Folder;
}AttribList;
/* Sequence of Attributes */
typedef sequence<AttribList> seqinputData;
interface testInterface {
seqinputData getStructure(in AttribList inputAttributes);
};
};
---------end of idl---------
I am using TAO1.1a for CORBA and in the implementaion class I am having a function that return a sequence of structure. I am getting "Debug Assertion failed" on the server side when I try to run the client.
This is the code snippet which throws error. can anybody help me to resolve?
---begin of test_i.cpp------
#include "test_i.h"
#include <ace/streams.h>
.
.
.
test::seqinputData* test_testInterface_i::getStructure (
const test::AttribList & inputAttributes
)
ACE_THROW_SPEC ((
CORBA::SystemException
))
{
listfo *fostruct;
.
.
.
test::seqinputData_var folderOutput = new test::seqinputData(0);
fostruct = callamethod();
.
.
.
while(fostruct != NULL)
{
test::AttribList_var fo = new test::AttribList;
fo->ObjName = fostruct->m_Name;
fo->Folder = fostruct->m_FolderName;
fo->Revision = fostruct->m_Revision;
folderOutput -> length(folderOutput -> length() + 1);
(folderOutput)[folderOutput -> length() - 1] = fo;
/*Print the PIV list-name,revision*/
printf("%s\t%s\t%s \n", fostruct->m_Name, fostruct->m_FolderName,fostruct->m_Revision) ;
fostruct = fostruct->m_NextPtr;
}
return folderOutput._retn();
}
.
.
.
-------end of test_i.cpp--------
The IDL is defined like this
-------begin of idl-------
module test{
typedef struct Attributes {
string ObjName;
string Revision;
string Folder;
}AttribList;
/* Sequence of Attributes */
typedef sequence<AttribList> seqinputData;
interface testInterface {
seqinputData getStructure(in AttribList inputAttributes);
};
};
---------end of idl---------