[
http://issues.apache.org/jira/browse/AXIS2-1346?page=comments#action_12443423 ]
Deepal Jayasinghe commented on AXIS2-1346:
------------------------------------------
How about the following approach ;
Say for instance your service impl class is as follows;
public class MyService {
public Bean1 getBean(Bean2 b2){
return new Bean1Impl();
}
}
Both Bean1 and Bean2 are interfaces. So Java2WSDL there wont be any problem
since it uses Bean Introspector and that does not care about the underline
implementation.
But the problem come at the runtime when you deploy this as a service (POJO),
how does RPCMessageReceiver create instance of Bean2 (since it's an interface
or may be abstract class) ?
So the solution I am thinking is to have a Object Suppler (OS) to provide impl
classes, at the RPC MR level when it receive a message it will call the OS and
ask for the impl class Then its up to the OS to give the correct impl class ,
and that will not reflect to client.
To have this we need to have additional entry in services.xml called ;
<parameter name="ObjectSuppler">org.xyz.ObjectSupplerImpl</parameter>
and we have to have interface called ObjectSuppler in Axis2.
Code inside MR will looki like follows
Object obj = ObjectSupplerImpl.getObject(Interface_name);
> Provide a way to expose interface to client instead of concrete class
> ---------------------------------------------------------------------
>
> Key: AXIS2-1346
> URL: http://issues.apache.org/jira/browse/AXIS2-1346
> Project: Apache Axis 2.0 (Axis2)
> Issue Type: Improvement
> Components: deployment
> Reporter: Deepal Jayasinghe
> Assigned To: Deepal Jayasinghe
>
> There may be instance where service author has interface that he need to
> generate wsdl , while he has separate service impl class. With current Axis2
> impl there is no way to achieve this goal.
> I think we can solve this problem by adding one more optional parameter to
> services.xml
> <parameter name="ServiceInterface">qualified name of the service interface
> </parameter>
> in addition to
> <parameter name="ServiceClass">qualified name of the service class
> </parameter>
--
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
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]