axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From axis-c-...@ws.apache.org
Subject [jira] Commented: (AXISCPP-157) WDSL2WS still produces a base class that has #includes to non-existent header files.
Date Mon, 13 Sep 2004 13:06:37 GMT
The following comment has been added to this issue:

     Author: Fred Preston
    Created: Mon, 13 Sep 2004 6:04 AM
       Body:
I have looked at the code and the following code offers a temporary solution:-

File: org.apache.axis.wsdl.wsdl2ws.cpp.literal.AllParamWriter.java
------------------------------------------------------------------

Add
===
private File getFilePath(String filename) throws WrapperFault
{
    String targetOutputLocation = this.wscontext.getWrapInfo().getTargetOutputLocation();
    if(targetOutputLocation.endsWith("/"))
    {
        targetOutputLocation = targetOutputLocation.substring(0, targetOutputLocation.length()
- 1);
        new File(targetOutputLocation).mkdirs();
        String fileName = targetOutputLocation + "/" + filename + ".h";
        return new File(fileName);
    }
}

And change from
===============
ArrayParamWriter writer = (new ArrayParamWriter(wscontext,type));
if (!writer.isSimpleTypeArray()) writer.writeSource();
}

To
==
ArrayParamWriter writer = (new ArrayParamWriter(wscontext,type));	
if (!writer.isSimpleTypeArray())
{
    writer.writeSource();
}
else
{
// FJP If the object is a simple type array, then there is no need to
//     create a header file for it.  Unfortunately, a header file has
//     already be declared in the base class so when the project is
//     built, the compiler will complain because the <name>.h file
//     will not be found.  There are at least three solutions this
//     problem:-
//     1. Rewrite the application to only create the class once all
//        of the associated objects have been resolved.
//     2. Go back and modify the class to remove the #include lines
//        that contain the unnecessary types.
//     3. Add empty files with the same filenames as the expected
//        includes so that the compiler will not complain. 
    System.out.println("Creating an empty "+ qname.getLocalPart()+".h file\n");
						
    BufferedWriter bw = null;
							
    try
    {
        bw = new BufferedWriter(new FileWriter(getFilePath(qname.getLocalPart()), false));
	bw.write("// Header file for " + qname.getLocalPart() + ".h\n");
	bw.flush();
	bw.close();
    }
    catch (IOException e)
    {
        e.printStackTrace();
	throw new WrapperFault(e);
    }
}

---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/AXISCPP-157?page=comments#action_53067

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/AXISCPP-157

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: AXISCPP-157
    Summary: WDSL2WS still produces a base class that has #includes to non-existent header
files.
       Type: Bug

     Status: Unassigned
   Priority: Critical

    Project: Axis-C++
 Components: 
             WSDL generation

   Assignee: 
   Reporter: Fred Preston

    Created: Mon, 13 Sep 2004 5:40 AM
    Updated: Mon, 13 Sep 2004 6:04 AM
Environment: n/a

Description:
WDSL2WS still produces a base class that has #includes to non-existent header files.


---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


Mime
View raw message