Using a Different Implementation Name
The name of the sample server implementation generated by HydraExpress is based on the port name defined in the WSDL, with the addition of Imp, as in <portType>Imp. The simplest way to implement the Web service is to use the sample implementation directly, without changing the name of the implementation class or the files.
However, there may be circumstances in which you want to change the name of the class that implements the service.
As an example, let’s suppose you wanted to change the name of the service implementation for the DayofWeek example from DayOfWeekPortTypeImp to MyDayofWeekImp. These are the changes you would need to make:
*Rename the implementation files
DayOfWeekPortTypeImp.h => MyDayofWeekImp.h
DayOfWeekPortTypeImp.cpp => MyDayofWeekImp.cpp
*In the renamed file MyDayofWeekImp.cpp:
*Change the include for the header:
#include MyDayofWeekImp.h
*Change the macro that registers the implementation:
RWSF_DEFINE_MESSAGE_HANDLER(MyDayofWeekImp)
*Change the method definition:
MyDayOfWeekImp::getDayOfWeek(...)
*In the renamed file MyDayofWeekImp.h, you would need to:
*Change the guard at the top of the file:
#ifndef MyDayOfWeekImp_h_
#define MyDayOfWeekImp_h_
*Change the class declaration:
class MyDayOfWeekImp : public DayOfWeekPortTypeBase
*In the makefile, search on the string DayOfWeekPortTypeImp and change it to MyDayOfWeekImp.
This would also be true of the debug makefile makefile_debug and of occurrences of DayOfWeekPortTypeImp in the MSVC project files.
*In the named object configuration file objects.xml, change the naming-class element from DayOfWeekPortService.createDayOfWeekPortTypeImp to DayOfWeekPortService.createMyDayOfWeekImp.
Similar changes would need to be made if your application used notification classes and you wished to change the notification implementation.
In addition, if your application contained generated datatype classes (located in your code generation directory’s codegen\data and include\data directories, you would need to:
*change both the header and implementation file names to the new name
*change any related includes in the renamed file MyDayofWeekImp.cpp