/* (non-Javadoc)
* @see org.apache.axis.wsdl.wsdl2ws.BasicFileWriter#writeMethods()
*/
protected void writeMethods() throws WrapperFault
{
MethodInfo minfo;
try
{
writer.write(
"extern void* get_"
+ classname
+ "_stub(const char* pchEndPointUri);\n");
writer.write(
"extern void destroy_" + classname + "_stub(void* p);\n");
writer.write(
"extern int get_" + classname + "_Status(void* pStub);\n");
for (int i = 0; i < methods.size(); i++)
{
minfo = (MethodInfo) this.methods.get(i);
boolean isAllTreatedAsOutParams = false;
ParameterInfo returntype = null;
int noOfOutParams = minfo.getOutputParameterTypes().size();
if (0 == noOfOutParams)
{
returntype = null;
writer.write("extern void ");
}
else
if (1 == noOfOutParams)
{
returntype =
(ParameterInfo) minfo
.getOutputParameterTypes()
.iterator()
.next();
writer.write(
"extern "
+ WrapperUtils
.getClassNameFromParamInfoConsideringArrays(
returntype,
wscontext)
+ " ");
}
else
{
isAllTreatedAsOutParams = true;
writer.write("extern void ");
}
writer.write(minfo.getMethodname() + "(void* pStub");
//write parameter names
Iterator params = minfo.getInputParameterTypes().iterator();
if (params.hasNext())
{
ParameterInfo fparam = (ParameterInfo) params.next();
writer.write(
", "
+ WrapperUtils
.getClassNameFromParamInfoConsideringArrays(
fparam,
wscontext)
+ " Value"
+ 0);
}
for (int j = 1; params.hasNext(); j++)
{
ParameterInfo nparam = (ParameterInfo) params.next();
writer.write(
", "
+ WrapperUtils
.getClassNameFromParamInfoConsideringArrays(
nparam,
wscontext)
+ " Value"
+ j);
}
if (isAllTreatedAsOutParams)
{
params = minfo.getOutputParameterTypes().iterator();
for (int j = 0; params.hasNext(); j++)
{
ParameterInfo nparam = (ParameterInfo) params.next();
writer.write(
", AXIS_OUT_PARAM "