Announcement Announcement Module
Collapse
No announcement yet.
HTTP Invoker and different package names. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • HTTP Invoker and different package names.

    Hi.

    I have a slow RPC with a third-party application based on SOAP.

    My goal is to replace this RPC calls for by others based on HTTP Invoker.

    My client application is coupled to the stub classes provided by the third party application.

    The problem that I have to face is that stub methods use different packages to exposed methods.

    For example:

    An exposed method by third-party application could be:

    package com.third-party-company.search

    public class com.third-party-company.search.ExposedClass implements com.third-party-company.search.ExposedClassInterface{

    public com.third-party-company.model.Result searchService(com.third-party-company.model.Query){
    ...
    }

    }

    And the respective class provided to my application should be:

    package com.third-party-company.webservice.search

    public class com.third-party-company. webservice.search.ExposedClass implements com.third-party-company. webservice.search.ExposedClassInterface{

    public com.third-party-company. webservice.model.Result searchService(com.third-party-company. webservice.model.Query){
    ...
    }

    }

    The reason why third-party application uses different packages is that the RPC is based on AXIS 1; and the classes was generated in different packages.

    So I use two different interfaces in client and in server. The only difference between interfaces is the package name. The same is for DTOs used by methods defined in the interfaces: the only difference is also the package name.

    AXIS has no problem with this fact. But I canít use different Interfaces on my HttpInvokerServiceExporter and HttpInvokerProxyFactoryBean beans.

    Is there any way to make a translation of classes or package names using HTTP Invoker?

    Iíve thought about doing a bean using object conversion. I can use a hashmap and BeanUtils to convert from a com.third-party-company.X class to a com.third-party-company.webservice.X class and vice versa. But that isnít my preferred solution if there is a way to make a translation.

    Notice that I canít do a class casting because a com.third-party-company.X class has no inheritance relation with the respective com.third-party-company.webservice.X class.

    What could I do?

    Thanks in advance.
Working...
X