Topic
  • 40 replies
  • Latest Post - ‏2013-07-19T15:42:25Z by YogeshS.Tamhane
rcher
rcher
49 Posts

Pinned topic Expose a Composite Transaction (Business Proxy) as a Web Service

‏2010-05-25T10:25:32Z | mdm-migration
Hi,

I have created a Composite Transaction (implemented using customized business proxy) and it is working perfect. However, I want the Composite Service to be exposed as a Web Service.

Could any one guide me in how to expose a composite transaction service as a web service in MDM Workbench? I could not able to find any documentation regarding the same.

It would be very helpful, if any of great minds could upload any reference docs for exposing the services as a Web Service.

Thanks in advance :)
  • SystemAdmin
    SystemAdmin
    938 Posts

    Re: Expose a Composite Transaction (Business Proxy) as a Web Service

    ‏2010-05-25T11:11:17Z  
    Hi,

    This question comes up frequently. Generation of skeleton code for business proxies and web service support is included in MDM Workbench v9.0.

    If you are using MDM 8.5, it is fairly straightforward to generate web service support for a business proxy:

    1. Create the equivalent transaction in a new MDM module using the exact same names as your BPs and generate the code.
    make sure you are using the exact same objects for inputs and ouputs

    This will generate the usual 5 projects:
    MyFakeBPModule
    MyFakeBPModuleEJB
    MyFakeBPModuleWS
    MyFakeBPModuleWSEJB
    MyFakeBPModuleWS_HTTPRouter

    2. Insert the two generated lines from MyFakeBPModule_DWLCommon_extension.properties into the DWLCommon_extension.properties.

    3. Delete the two Projects:
    MyFakeBPModule (back up the module.mdmxmi file somewhere else in case you want to repeat this process)
    MyFakeBPModuleEJB

    4. Redeploy, and you should be good to go.
    That is working only if your BP implementation is already in place and working obviously

    If you look at the implementation of the WebService Bean:
    MyFakeBPModuleServiceBean, the implementation of the operation matching your transaction name is as follow:

    return (XXXResponse)performServiceOperation(new Request("<your transaction name>", control, request));

    If the transaction name matches the one your BP is associated with name (and therefore it's a known transaction), the requestHandler will be able to find it.

    (With thanks to Julien Pradier)

    This becomes more complicated if the request/response objects for the transaction are not known to the workbench, but hopefully this should get you started.

    Catherine.
  • rcher
    rcher
    49 Posts

    Re: Expose a Composite Transaction (Business Proxy) as a Web Service

    ‏2010-05-25T12:22:22Z  
    Hi,

    This question comes up frequently. Generation of skeleton code for business proxies and web service support is included in MDM Workbench v9.0.

    If you are using MDM 8.5, it is fairly straightforward to generate web service support for a business proxy:

    1. Create the equivalent transaction in a new MDM module using the exact same names as your BPs and generate the code.
    make sure you are using the exact same objects for inputs and ouputs

    This will generate the usual 5 projects:
    MyFakeBPModule
    MyFakeBPModuleEJB
    MyFakeBPModuleWS
    MyFakeBPModuleWSEJB
    MyFakeBPModuleWS_HTTPRouter

    2. Insert the two generated lines from MyFakeBPModule_DWLCommon_extension.properties into the DWLCommon_extension.properties.

    3. Delete the two Projects:
    MyFakeBPModule (back up the module.mdmxmi file somewhere else in case you want to repeat this process)
    MyFakeBPModuleEJB

    4. Redeploy, and you should be good to go.
    That is working only if your BP implementation is already in place and working obviously

    If you look at the implementation of the WebService Bean:
    MyFakeBPModuleServiceBean, the implementation of the operation matching your transaction name is as follow:

    return (XXXResponse)performServiceOperation(new Request("<your transaction name>", control, request));

    If the transaction name matches the one your BP is associated with name (and therefore it's a known transaction), the requestHandler will be able to find it.

    (With thanks to Julien Pradier)

    This becomes more complicated if the request/response objects for the transaction are not known to the workbench, but hopefully this should get you started.

    Catherine.
    Thanks a lot Catherine for the detailed explanation. :)

    But, I am using MDM 8.1.0
    Do you have any inputs, how to implement the same in MDM 8.1.0 ?

    Thanks once again
  • SystemAdmin
    SystemAdmin
    938 Posts

    Re: Expose a Composite Transaction (Business Proxy) as a Web Service

    ‏2010-05-25T12:37:13Z  
    • rcher
    • ‏2010-05-25T12:22:22Z
    Thanks a lot Catherine for the detailed explanation. :)

    But, I am using MDM 8.1.0
    Do you have any inputs, how to implement the same in MDM 8.1.0 ?

    Thanks once again
    Hi,

    It should be exactly the same with MDM 8.1.0 - there have been no major changes to how web services work since v8.0.

    Catherine.
  • rcher
    rcher
    49 Posts

    Re: Expose a Composite Transaction (Business Proxy) as a Web Service

    ‏2010-05-26T10:26:57Z  
    Hi,

    It should be exactly the same with MDM 8.1.0 - there have been no major changes to how web services work since v8.0.

    Catherine.
    Hi,

    I was able to create the WS for my Composite Transaction as per as your steps.

    I am getting a WSDL2Java VALIDATION ERROR while publishing my server. My server is WAS v6.1

    Please find attachement, the error I am getting.

    Could any one please help me out?

    Regards
  • SystemAdmin
    SystemAdmin
    938 Posts

    Re: Expose a Composite Transaction (Business Proxy) as a Web Service

    ‏2010-05-26T10:47:19Z  
    • rcher
    • ‏2010-05-26T10:26:57Z
    Hi,

    I was able to create the WS for my Composite Transaction as per as your steps.

    I am getting a WSDL2Java VALIDATION ERROR while publishing my server. My server is WAS v6.1

    Please find attachement, the error I am getting.

    Could any one please help me out?

    Regards
    Hi,

    Check the J2EE Dependencies (see project Properties) for your WSEJB project and ensure that they include all the WS projects which it depends on directly or indirectly - this is probably: PartyWS, FinancialServicesWS, BusinessServicesWS, DWLBusinessServicesWS, DWLCommonServicesWS. Then try the publish again.

    If that doesn't work please post here details of the web service you are trying to build - the request and response objects which it uses.

    Hope that helps, Catherine.
  • rcher
    rcher
    49 Posts

    Re: Expose a Composite Transaction (Business Proxy) as a Web Service

    ‏2010-05-31T07:06:51Z  
    Hi,

    Check the J2EE Dependencies (see project Properties) for your WSEJB project and ensure that they include all the WS projects which it depends on directly or indirectly - this is probably: PartyWS, FinancialServicesWS, BusinessServicesWS, DWLBusinessServicesWS, DWLCommonServicesWS. Then try the publish again.

    If that doesn't work please post here details of the web service you are trying to build - the request and response objects which it uses.

    Hope that helps, Catherine.
    Hi,

    Thanks a lot for ur help. I got my error resolved by adding the projects to my buid path.

    However, the MDM.ear is not getting deployed to WAS 6.1.0.2 . I am able to start the server.

    DO we require Web Service Interim Fix Pack 53084 to develop Web Services in WAS 6.1 env ?

    Regards
  • rcher
    rcher
    49 Posts

    Re: Expose a Composite Transaction (Business Proxy) as a Web Service

    ‏2010-06-01T03:55:25Z  
    • rcher
    • ‏2010-05-31T07:06:51Z
    Hi,

    Thanks a lot for ur help. I got my error resolved by adding the projects to my buid path.

    However, the MDM.ear is not getting deployed to WAS 6.1.0.2 . I am able to start the server.

    DO we require Web Service Interim Fix Pack 53084 to develop Web Services in WAS 6.1 env ?

    Regards
    Hi,

    I resloved the problem. The problem was the server was caching the MDM.ear. I resolved it by manually redeploying the MDM.ear to WAS.

    Thanks a lot for the help,
    Roshni
  • rcher
    rcher
    49 Posts

    Re: Expose a Composite Transaction (Business Proxy) as a Web Service

    ‏2010-06-02T05:23:12Z  
    • rcher
    • ‏2010-06-01T03:55:25Z
    Hi,

    I resloved the problem. The problem was the server was caching the MDM.ear. I resolved it by manually redeploying the MDM.ear to WAS.

    Thanks a lot for the help,
    Roshni
    Hi,

    I need an urgent help. While testing my Web Service, I am getting the below error in SystemOut.log.

    6/1/10 18:19:53:193 IST 00000019 ConfigErrorHa E DYNA0045E: XML parsing error: Content is not allowed in prolog., while parsing file file:///E:/Workspace/new1/MDM/BusinessServicesWS_HTTPRouter.war at line 1, column 1.
    6/1/10 18:19:53:225 IST 00000019 ConfigManager E DYNA0045E: XML parsing error: Content is not allowed in prolog., while parsing file E:\Workspace\new1\MDM\BusinessServicesWS_HTTPRouter.war at line 1, column 1.
    6/1/10 18:19:53:225 IST 00000019 ConfigManager E DYNA0043E: Configuration file E:\Workspace\new1\MDM\BusinessServicesWS_HTTPRouter.war (E:\Workspace\new1\MDM\BusinessServicesWS_HTTPRouter.war) contained errors and will not be used.
    6/1/10 18:19:53:240 IST 00000019 SystemOut O SAXParseException loading cache entries from E:\Workspace\new1\MDM\BusinessServicesWS_HTTPRouter.war (E:\Workspace\new1\MDM\BusinessServicesWS_HTTPRouter.war): Content is not allowed in prolog. at line 1 coloumn 1
    6/1/10 18:19:53:240 IST 00000019 WebGroup A SRVE0169I: Loading Web Module: BusinessServicesWS_HTTPRouter.
    6/1/10 18:19:53:272 IST 00000019 VirtualHost I SRVE0250I: Web Module BusinessServicesWS_HTTPRouter has been bound to default_host:9082,:80,:9445,:5065,:5064,:443.
    6/1/10 18:19:53:287 IST 00000019 ConfigErrorHa E DYNA0045E: XML parsing error: Content is not allowed in prolog., while parsing file file:///E:/Workspace/new1/MDM/DWLBusinessServicesWS_HTTPRouter.war at line 1, column 1.
    6/1/10 18:19:53:537 IST 00000019 ConfigManager E DYNA0045E: XML parsing error: Content is not allowed in prolog., while parsing file E:\Workspace\new1\MDM\DWLBusinessServicesWS_HTTPRouter.war at line 1, column 1.
    6/1/10 18:19:53:537 IST 00000019 ConfigManager E DYNA0043E: Configuration file E:\Workspace\new1\MDM\DWLBusinessServicesWS_HTTPRouter.war (E:\Workspace\new1\MDM\DWLBusinessServicesWS_HTTPRouter.war) contained errors and will not be used.
    6/1/10 18:19:53:553 IST 00000019 SystemOut O SAXParseException loading cache entries from E:\Workspace\new1\MDM\DWLBusinessServicesWS_HTTPRouter.war (E:\Workspace\new1\MDM\DWLBusinessServicesWS_HTTPRouter.war): Content is not allowed in prolog. at line 1 coloumn 1
    6/1/10 18:19:53:553 IST 00000019 WebGroup A SRVE0169I: Loading Web Module: DWLBusinessServicesWS_HTTPRouter.
    6/1/10 18:19:53:568 IST 00000019 VirtualHost I SRVE0250I: Web Module DWLBusinessServicesWS_HTTPRouter has been bound to default_host:9082,:80,:9445,:5065,:5064,:443.
    6/1/10 18:19:53:631 IST 00000019 ConfigErrorHa E DYNA0045E: XML parsing error: Content is not allowed in prolog., while parsing file file:///E:/Workspace/new1/MDM/FinancialServicesWS_HTTPRouter.war at line 1, column 1.
    6/1/10 18:19:53:647 IST 00000019 ConfigManager E DYNA0045E: XML parsing error: Content is not allowed in prolog., while parsing file E:\Workspace\new1\MDM\FinancialServicesWS_HTTPRouter.war at line 1, column 1.
    6/1/10 18:19:53:647 IST 00000019 ConfigManager E DYNA0043E: Configuration file E:\Workspace\new1\MDM\FinancialServicesWS_HTTPRouter.war (E:\Workspace\new1\MDM\FinancialServicesWS_HTTPRouter.war) contained errors and will not be used.
    6/1/10 18:19:53:662 IST 00000019 SystemOut O SAXParseException loading cache entries from E:\Workspace\new1\MDM\FinancialServicesWS_HTTPRouter.war (E:\Workspace\new1\MDM\FinancialServicesWS_HTTPRouter.war): Content is not allowed in prolog. at line 1 coloumn 1
    6/1/10 18:19:53:662 IST 00000019 WebGroup A SRVE0169I: Loading Web Module: FinancialServicesWS_HTTPRouter.
    6/1/10 18:19:53:678 IST 00000019 VirtualHost I SRVE0250I: Web Module FinancialServicesWS_HTTPRouter has been bound to default_host:9082,:80,:9445,:5065,:5064,:443.
    6/1/10 18:19:53:740 IST 00000019 ConfigErrorHa E DYNA0045E: XML parsing error: Content is not allowed in prolog., while parsing file file:///E:/Workspace/new1/MDM/PartyWS_HTTPRouter.war at line 1, column 1.
    6/1/10 18:19:53:740 IST 00000019 ConfigManager E DYNA0045E: XML parsing error: Content is not allowed in prolog., while parsing file E:\Workspace\new1\MDM\PartyWS_HTTPRouter.war at line 1, column 1.
    6/1/10 18:19:53:740 IST 00000019 ConfigManager E DYNA0043E: Configuration file E:\Workspace\new1\MDM\PartyWS_HTTPRouter.war (E:\Workspace\new1\MDM\PartyWS_HTTPRouter.war) contained errors and will not be used.
    6/1/10 18:19:53:740 IST 00000019 SystemOut O SAXParseException loading cache entries from E:\Workspace\new1\MDM\PartyWS_HTTPRouter.war (E:\Workspace\new1\MDM\PartyWS_HTTPRouter.war): Content is not allowed in prolog. at line 1 coloumn 1
    6/1/10 18:19:53:756 IST 00000019 WebGroup A SRVE0169I: Loading Web Module: PartyWS_HTTPRouter.
    6/1/10 18:19:53:756 IST 00000019 VirtualHost I SRVE0250I: Web Module PartyWS_HTTPRouter has been bound to default_host:9082,:80,:9445,:5065,:5064,:443.
    6/1/10 18:19:53:850 IST 00000019 ConfigErrorHa E DYNA0045E: XML parsing error: Content is not allowed in prolog., while parsing file file:///E:/Workspace/new1/MDM/ProductServicesWS_HTTPRouter.war at line 1, column 1.
    6/1/10 18:19:53:850 IST 00000019 ConfigManager E DYNA0045E: XML parsing error: Content is not allowed in prolog., while parsing file E:\Workspace\new1\MDM\ProductServicesWS_HTTPRouter.war at line 1, column 1.
    6/1/10 18:19:53:850 IST 00000019 ConfigManager E DYNA0043E: Configuration file E:\Workspace\new1\MDM\ProductServicesWS_HTTPRouter.war (E:\Workspace\new1\MDM\ProductServicesWS_HTTPRouter.war) contained errors and will not be used.
    6/1/10 18:19:53:865 IST 00000019 SystemOut O SAXParseException loading cache entries from E:\Workspace\new1\MDM\ProductServicesWS_HTTPRouter.war (E:\Workspace\new1\MDM\ProductServicesWS_HTTPRouter.war): Content is not allowed in prolog. at line 1 coloumn 1

    Please help

    Regards
  • SystemAdmin
    SystemAdmin
    938 Posts

    Re: Expose a Composite Transaction (Business Proxy) as a Web Service

    ‏2010-06-02T08:56:20Z  
    • rcher
    • ‏2010-06-02T05:23:12Z
    Hi,

    I need an urgent help. While testing my Web Service, I am getting the below error in SystemOut.log.

    6/1/10 18:19:53:193 IST 00000019 ConfigErrorHa E DYNA0045E: XML parsing error: Content is not allowed in prolog., while parsing file file:///E:/Workspace/new1/MDM/BusinessServicesWS_HTTPRouter.war at line 1, column 1.
    6/1/10 18:19:53:225 IST 00000019 ConfigManager E DYNA0045E: XML parsing error: Content is not allowed in prolog., while parsing file E:\Workspace\new1\MDM\BusinessServicesWS_HTTPRouter.war at line 1, column 1.
    6/1/10 18:19:53:225 IST 00000019 ConfigManager E DYNA0043E: Configuration file E:\Workspace\new1\MDM\BusinessServicesWS_HTTPRouter.war (E:\Workspace\new1\MDM\BusinessServicesWS_HTTPRouter.war) contained errors and will not be used.
    6/1/10 18:19:53:240 IST 00000019 SystemOut O SAXParseException loading cache entries from E:\Workspace\new1\MDM\BusinessServicesWS_HTTPRouter.war (E:\Workspace\new1\MDM\BusinessServicesWS_HTTPRouter.war): Content is not allowed in prolog. at line 1 coloumn 1
    6/1/10 18:19:53:240 IST 00000019 WebGroup A SRVE0169I: Loading Web Module: BusinessServicesWS_HTTPRouter.
    6/1/10 18:19:53:272 IST 00000019 VirtualHost I SRVE0250I: Web Module BusinessServicesWS_HTTPRouter has been bound to default_host:9082,:80,:9445,:5065,:5064,:443.
    6/1/10 18:19:53:287 IST 00000019 ConfigErrorHa E DYNA0045E: XML parsing error: Content is not allowed in prolog., while parsing file file:///E:/Workspace/new1/MDM/DWLBusinessServicesWS_HTTPRouter.war at line 1, column 1.
    6/1/10 18:19:53:537 IST 00000019 ConfigManager E DYNA0045E: XML parsing error: Content is not allowed in prolog., while parsing file E:\Workspace\new1\MDM\DWLBusinessServicesWS_HTTPRouter.war at line 1, column 1.
    6/1/10 18:19:53:537 IST 00000019 ConfigManager E DYNA0043E: Configuration file E:\Workspace\new1\MDM\DWLBusinessServicesWS_HTTPRouter.war (E:\Workspace\new1\MDM\DWLBusinessServicesWS_HTTPRouter.war) contained errors and will not be used.
    6/1/10 18:19:53:553 IST 00000019 SystemOut O SAXParseException loading cache entries from E:\Workspace\new1\MDM\DWLBusinessServicesWS_HTTPRouter.war (E:\Workspace\new1\MDM\DWLBusinessServicesWS_HTTPRouter.war): Content is not allowed in prolog. at line 1 coloumn 1
    6/1/10 18:19:53:553 IST 00000019 WebGroup A SRVE0169I: Loading Web Module: DWLBusinessServicesWS_HTTPRouter.
    6/1/10 18:19:53:568 IST 00000019 VirtualHost I SRVE0250I: Web Module DWLBusinessServicesWS_HTTPRouter has been bound to default_host:9082,:80,:9445,:5065,:5064,:443.
    6/1/10 18:19:53:631 IST 00000019 ConfigErrorHa E DYNA0045E: XML parsing error: Content is not allowed in prolog., while parsing file file:///E:/Workspace/new1/MDM/FinancialServicesWS_HTTPRouter.war at line 1, column 1.
    6/1/10 18:19:53:647 IST 00000019 ConfigManager E DYNA0045E: XML parsing error: Content is not allowed in prolog., while parsing file E:\Workspace\new1\MDM\FinancialServicesWS_HTTPRouter.war at line 1, column 1.
    6/1/10 18:19:53:647 IST 00000019 ConfigManager E DYNA0043E: Configuration file E:\Workspace\new1\MDM\FinancialServicesWS_HTTPRouter.war (E:\Workspace\new1\MDM\FinancialServicesWS_HTTPRouter.war) contained errors and will not be used.
    6/1/10 18:19:53:662 IST 00000019 SystemOut O SAXParseException loading cache entries from E:\Workspace\new1\MDM\FinancialServicesWS_HTTPRouter.war (E:\Workspace\new1\MDM\FinancialServicesWS_HTTPRouter.war): Content is not allowed in prolog. at line 1 coloumn 1
    6/1/10 18:19:53:662 IST 00000019 WebGroup A SRVE0169I: Loading Web Module: FinancialServicesWS_HTTPRouter.
    6/1/10 18:19:53:678 IST 00000019 VirtualHost I SRVE0250I: Web Module FinancialServicesWS_HTTPRouter has been bound to default_host:9082,:80,:9445,:5065,:5064,:443.
    6/1/10 18:19:53:740 IST 00000019 ConfigErrorHa E DYNA0045E: XML parsing error: Content is not allowed in prolog., while parsing file file:///E:/Workspace/new1/MDM/PartyWS_HTTPRouter.war at line 1, column 1.
    6/1/10 18:19:53:740 IST 00000019 ConfigManager E DYNA0045E: XML parsing error: Content is not allowed in prolog., while parsing file E:\Workspace\new1\MDM\PartyWS_HTTPRouter.war at line 1, column 1.
    6/1/10 18:19:53:740 IST 00000019 ConfigManager E DYNA0043E: Configuration file E:\Workspace\new1\MDM\PartyWS_HTTPRouter.war (E:\Workspace\new1\MDM\PartyWS_HTTPRouter.war) contained errors and will not be used.
    6/1/10 18:19:53:740 IST 00000019 SystemOut O SAXParseException loading cache entries from E:\Workspace\new1\MDM\PartyWS_HTTPRouter.war (E:\Workspace\new1\MDM\PartyWS_HTTPRouter.war): Content is not allowed in prolog. at line 1 coloumn 1
    6/1/10 18:19:53:756 IST 00000019 WebGroup A SRVE0169I: Loading Web Module: PartyWS_HTTPRouter.
    6/1/10 18:19:53:756 IST 00000019 VirtualHost I SRVE0250I: Web Module PartyWS_HTTPRouter has been bound to default_host:9082,:80,:9445,:5065,:5064,:443.
    6/1/10 18:19:53:850 IST 00000019 ConfigErrorHa E DYNA0045E: XML parsing error: Content is not allowed in prolog., while parsing file file:///E:/Workspace/new1/MDM/ProductServicesWS_HTTPRouter.war at line 1, column 1.
    6/1/10 18:19:53:850 IST 00000019 ConfigManager E DYNA0045E: XML parsing error: Content is not allowed in prolog., while parsing file E:\Workspace\new1\MDM\ProductServicesWS_HTTPRouter.war at line 1, column 1.
    6/1/10 18:19:53:850 IST 00000019 ConfigManager E DYNA0043E: Configuration file E:\Workspace\new1\MDM\ProductServicesWS_HTTPRouter.war (E:\Workspace\new1\MDM\ProductServicesWS_HTTPRouter.war) contained errors and will not be used.
    6/1/10 18:19:53:865 IST 00000019 SystemOut O SAXParseException loading cache entries from E:\Workspace\new1\MDM\ProductServicesWS_HTTPRouter.war (E:\Workspace\new1\MDM\ProductServicesWS_HTTPRouter.war): Content is not allowed in prolog. at line 1 coloumn 1

    Please help

    Regards
    Hi,

    Although there are errors reported, the Web modules seem to be being loaded and bound to ports. Does the MDM application eventually start, or not ?

    I have sometimes seen deployment descriptor files in the workspace get corrupted. Check one of the indicated projects - like BusinessServicesWS_HTTPRouter - and look at the web.xml file and ibm xmi files. Make sure the XML content looks valid.

    If there is no obvious reason for the errors, remove MDM from the WAS server, restart the server, then try adding MDM back again.

    Hope that helps, Catherine.
  • rcher
    rcher
    49 Posts

    Re: Expose a Composite Transaction (Business Proxy) as a Web Service

    ‏2010-06-02T12:17:14Z  
    Hi,

    Although there are errors reported, the Web modules seem to be being loaded and bound to ports. Does the MDM application eventually start, or not ?

    I have sometimes seen deployment descriptor files in the workspace get corrupted. Check one of the indicated projects - like BusinessServicesWS_HTTPRouter - and look at the web.xml file and ibm xmi files. Make sure the XML content looks valid.

    If there is no obvious reason for the errors, remove MDM from the WAS server, restart the server, then try adding MDM back again.

    Hope that helps, Catherine.
    Catherine,

    Still I am getting that Error in the log. The error generates for all the *WS_HTTPRouter projects when I start WAS. Eventually the MDM application starts. No issues in publishing..

    I am getting the below error when I run my application to test the Web Service. (Composite Transaction as Web Service).
    JDK Logger will be used. java.util.MissingResourceException: Can't find bundle for base name DWLLog, locale en_US
    DWLJDKLogger: Could not load logging configuration file: null
    Jun 2, 2010 5:36:15 PM com.dwl.base.logging.DWLJDKLogger log
    SEVERE: Parsing of cacheProperties failed: java.lang.IllegalArgumentException: InputStream cannot be null
    Jun 2, 2010 5:36:15 PM com.dwl.base.logging.DWLJDKLogger log
    INFO: Couldn't get the cache from CacheManager :BackwardCompatibleConfigCache
    com.ibm.mdm.cache.common.CacheException: Error while loading the CacheManager Implementation class for component: ConfigurationRepository: java.lang.NullPointerException
    Jun 2, 2010 5:36:15 PM com.dwl.base.logging.DWLJDKLogger log
    INFO: Couldn't get the Session cache from CacheManager
    com.ibm.mdm.cache.common.CacheException: Error while loading the CacheManager Implementation class for component: ConfigurationRepository: java.lang.NullPointerException
    Exception in thread "main" java.lang.ExceptionInInitializerError
    at java.lang.J9VMInternals.initialize(J9VMInternals.java:195)
    at com.dwl.base.util.ServiceLocator.getInstance(ServiceLocator.java:173)
    at com.dwl.base.db.DataManager.getServiceLocator(DataManager.java:161)
    at com.dwl.base.db.DataManager.initializeDataSource(DataManager.java:148)
    at com.dwl.base.db.DataManager.getDataSource(DataManager.java:133)
    at com.dwl.base.db.DataManager.getDataSource(DataManager.java:118)
    at com.dwl.base.db.DataManager.getData0Connection(DataManager.java:172)
    at com.dwl.base.db.DataManager.getQueryConnection(DataManager.java:198)
    at com.dwl.base.error.ErrorMessagingDBCache.buildComponentTypeMap(ErrorMessagingDBCache.java:230)
    at com.dwl.base.error.ErrorMessagingDBCache.loadErrorCache(ErrorMessagingDBCache.java:501)
    at com.dwl.base.error.ErrorMessagingDBCache.<init>(ErrorMessagingDBCache.java:216)
    at com.dwl.base.error.DWLErrorMessageComponent.<init>(DWLErrorMessageComponent.java:143)
    at com.dwl.base.util.DWLClassFactory.getErrorHandler(DWLClassFactory.java:159)
    at com.dwl.base.DWLCommon.<init>(DWLCommon.java:185)
    at com.dwl.tcrm.common.TCRMCommon.<init>(TCRMCommon.java:88)
    at com.dwl.tcrm.financial.component.TCRMContractBObj.<init>(TCRMContractBObj.java:174)
    at com.ustri.ibm.component.XContractBObjExt.<init>(XContractBObjExt.java:73)
    at com.ust.mdm.DWLServiceControllerTester.main(DWLServiceControllerTester.java:270)
    Caused by: java.lang.NullPointerException
    at com.dwl.management.config.client.Configuration.loadBackwardCompatibleNamesMap(Configuration.java:399)
    at com.dwl.management.config.client.Configuration.<clinit>(Configuration.java:156)
    at java.lang.J9VMInternals.initializeImpl(Native Method)
    at java.lang.J9VMInternals.initialize(J9VMInternals.java:177)+

    I have pointed my project to the Logging.jar. Could not able to figure out the reason for the error :(

    Thanks in advance
  • SystemAdmin
    SystemAdmin
    938 Posts

    Re: Expose a Composite Transaction (Business Proxy) as a Web Service

    ‏2010-06-02T14:18:56Z  
    • rcher
    • ‏2010-06-02T12:17:14Z
    Catherine,

    Still I am getting that Error in the log. The error generates for all the *WS_HTTPRouter projects when I start WAS. Eventually the MDM application starts. No issues in publishing..

    I am getting the below error when I run my application to test the Web Service. (Composite Transaction as Web Service).
    JDK Logger will be used. java.util.MissingResourceException: Can't find bundle for base name DWLLog, locale en_US
    DWLJDKLogger: Could not load logging configuration file: null
    Jun 2, 2010 5:36:15 PM com.dwl.base.logging.DWLJDKLogger log
    SEVERE: Parsing of cacheProperties failed: java.lang.IllegalArgumentException: InputStream cannot be null
    Jun 2, 2010 5:36:15 PM com.dwl.base.logging.DWLJDKLogger log
    INFO: Couldn't get the cache from CacheManager :BackwardCompatibleConfigCache
    com.ibm.mdm.cache.common.CacheException: Error while loading the CacheManager Implementation class for component: ConfigurationRepository: java.lang.NullPointerException
    Jun 2, 2010 5:36:15 PM com.dwl.base.logging.DWLJDKLogger log
    INFO: Couldn't get the Session cache from CacheManager
    com.ibm.mdm.cache.common.CacheException: Error while loading the CacheManager Implementation class for component: ConfigurationRepository: java.lang.NullPointerException
    Exception in thread "main" java.lang.ExceptionInInitializerError
    at java.lang.J9VMInternals.initialize(J9VMInternals.java:195)
    at com.dwl.base.util.ServiceLocator.getInstance(ServiceLocator.java:173)
    at com.dwl.base.db.DataManager.getServiceLocator(DataManager.java:161)
    at com.dwl.base.db.DataManager.initializeDataSource(DataManager.java:148)
    at com.dwl.base.db.DataManager.getDataSource(DataManager.java:133)
    at com.dwl.base.db.DataManager.getDataSource(DataManager.java:118)
    at com.dwl.base.db.DataManager.getData0Connection(DataManager.java:172)
    at com.dwl.base.db.DataManager.getQueryConnection(DataManager.java:198)
    at com.dwl.base.error.ErrorMessagingDBCache.buildComponentTypeMap(ErrorMessagingDBCache.java:230)
    at com.dwl.base.error.ErrorMessagingDBCache.loadErrorCache(ErrorMessagingDBCache.java:501)
    at com.dwl.base.error.ErrorMessagingDBCache.<init>(ErrorMessagingDBCache.java:216)
    at com.dwl.base.error.DWLErrorMessageComponent.<init>(DWLErrorMessageComponent.java:143)
    at com.dwl.base.util.DWLClassFactory.getErrorHandler(DWLClassFactory.java:159)
    at com.dwl.base.DWLCommon.<init>(DWLCommon.java:185)
    at com.dwl.tcrm.common.TCRMCommon.<init>(TCRMCommon.java:88)
    at com.dwl.tcrm.financial.component.TCRMContractBObj.<init>(TCRMContractBObj.java:174)
    at com.ustri.ibm.component.XContractBObjExt.<init>(XContractBObjExt.java:73)
    at com.ust.mdm.DWLServiceControllerTester.main(DWLServiceControllerTester.java:270)
    Caused by: java.lang.NullPointerException
    at com.dwl.management.config.client.Configuration.loadBackwardCompatibleNamesMap(Configuration.java:399)
    at com.dwl.management.config.client.Configuration.<clinit>(Configuration.java:156)
    at java.lang.J9VMInternals.initializeImpl(Native Method)
    at java.lang.J9VMInternals.initialize(J9VMInternals.java:177)+

    I have pointed my project to the Logging.jar. Could not able to figure out the reason for the error :(

    Thanks in advance
    Hi,

    If the MDM application is starting up then I would ignore the WAS error for the moment - it may be an internal WAS problem rather than anything wrong with the MDM application.

    The error you see when you test your web service is not related, and it sounds like it is a problem with the MDM properties files not being loaded. If you are deploying and testing MDM in a development environment, then the properties files are located in the CustomerResources project in your workspace, and the path to these files should be on the application server classpath so that it will load them directly from there. Check that the WAS server classpath is setup correctly to point to your workspace.

    Go in to the WAS admin console, select the server, on the right hand side of the panel find Java and Process Management - Process Definition. On the next page, select Java Virtual Machine. You can edit the classpath if it is not correct.

    Hope that helps, Catherine.
  • rcher
    rcher
    49 Posts

    Re: Expose a Composite Transaction (Business Proxy) as a Web Service

    ‏2010-06-03T04:50:32Z  
    Hi,

    If the MDM application is starting up then I would ignore the WAS error for the moment - it may be an internal WAS problem rather than anything wrong with the MDM application.

    The error you see when you test your web service is not related, and it sounds like it is a problem with the MDM properties files not being loaded. If you are deploying and testing MDM in a development environment, then the properties files are located in the CustomerResources project in your workspace, and the path to these files should be on the application server classpath so that it will load them directly from there. Check that the WAS server classpath is setup correctly to point to your workspace.

    Go in to the WAS admin console, select the server, on the right hand side of the panel find Java and Process Management - Process Definition. On the next page, select Java Virtual Machine. You can edit the classpath if it is not correct.

    Hope that helps, Catherine.
    Catherine,

    I have already checked whether the property files are properly configured in the classpath setup of the WAS server. The mapping is correct.

    Any other inputs Catherine?
  • SystemAdmin
    SystemAdmin
    938 Posts

    Re: Expose a Composite Transaction (Business Proxy) as a Web Service

    ‏2010-06-03T09:06:32Z  
    • rcher
    • ‏2010-06-03T04:50:32Z
    Catherine,

    I have already checked whether the property files are properly configured in the classpath setup of the WAS server. The mapping is correct.

    Any other inputs Catherine?
    Hi,

    The error messages indicate that the properties files - DWLLog.properties, cacheProperties.xml, cannot be loaded. Any errors after that are consequences of not having loaded the properties files. The usual cause is an incorrect server classpath - I don't know of anything else that could cause it.

    Catherine.
  • rcher
    rcher
    49 Posts

    Re: Expose a Composite Transaction (Business Proxy) as a Web Service

    ‏2010-06-03T13:12:32Z  
    Hi,

    The error messages indicate that the properties files - DWLLog.properties, cacheProperties.xml, cannot be loaded. Any errors after that are consequences of not having loaded the properties files. The usual cause is an incorrect server classpath - I don't know of anything else that could cause it.

    Catherine.
    Hi,

    I had given an extension to the CONTRACT table . When I removed the XContractBObjExt Object to get the extended fields from my xml, the previous error got cleared and now am getting an SSL error. Even I tried calling the Party Web Service which is also giving the same error.

    Jun 3, 2010 6:33:26 PM com.ibm.ws.ssl.config.SSLConfigManager
    INFO: ssl.disable.url.hostname.verification.CWPKI0027I
    Jun 3, 2010 6:33:27 PM com.ibm.ws.webservices.engine.PivotHandlerWrapper invoke
    WARNING: WSWS3734W: Warning: Exception caught from invocation to com.ibm.ws.webservices.engine.transport.http.HTTPSender:
    WebServicesFault
    faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
    faultString: WSWS3713E: Connection to the remote host localhost failed.Received the following error: Connection refused: no further information
    faultActor: null
    faultDetail:

    WSWS3713E: Connection to the remote host localhost failed.Received the following error: Connection refused: no further information
    at com.ibm.ws.webservices.engine.transport.http.HttpOutboundChannelConnection.connect(HttpOutboundChannelConnection.java:752)
    at com.ibm.ws.webservices.engine.transport.channel.OutboundConnectionGroup.createConnection(OutboundConnectionGroup.java:133)
    at com.ibm.ws.webservices.engine.transport.channel.OutboundConnectionCache.findGroupAndGetConnection(OutboundConnectionCache.java:331)
    at com.ibm.ws.webservices.engine.transport.http.HTTPSender.invoke(HTTPSender.java:510)
    at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:227)
    at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:227)
    at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:227)
    at com.ibm.ws.webservices.engine.WebServicesEngine.invoke(WebServicesEngine.java:332)
    at com.ibm.ws.webservices.engine.client.Connection.invokeEngine(Connection.java:738)
    at com.ibm.ws.webservices.engine.client.Connection.invoke(Connection.java:659)
    at com.ibm.ws.webservices.engine.client.Connection.invoke(Connection.java:617)
    at com.ibm.ws.webservices.engine.client.Connection.invoke(Connection.java:452)
    at com.ibm.ws.webservices.engine.client.Stub$Invoke.invoke(Stub.java:908)
    at com.ust_global.www.managecontract.binding.ManageContractBindingStub.addCustomerClubCardBP(ManageContractBindingStub.java)
    at com.ust.mdm.XMLTest.main(XMLTest.java)

    I have given the same URL as in the WSDL file from which I created the Client.

    Could you please help me out, since I am new to Web Service security :(

    Thanks a million for all ur help..
  • rcher
    rcher
    49 Posts

    Re: Expose a Composite Transaction (Business Proxy) as a Web Service

    ‏2010-06-09T08:09:51Z  
    • rcher
    • ‏2010-06-03T13:12:32Z
    Hi,

    I had given an extension to the CONTRACT table . When I removed the XContractBObjExt Object to get the extended fields from my xml, the previous error got cleared and now am getting an SSL error. Even I tried calling the Party Web Service which is also giving the same error.

    Jun 3, 2010 6:33:26 PM com.ibm.ws.ssl.config.SSLConfigManager
    INFO: ssl.disable.url.hostname.verification.CWPKI0027I
    Jun 3, 2010 6:33:27 PM com.ibm.ws.webservices.engine.PivotHandlerWrapper invoke
    WARNING: WSWS3734W: Warning: Exception caught from invocation to com.ibm.ws.webservices.engine.transport.http.HTTPSender:
    WebServicesFault
    faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
    faultString: WSWS3713E: Connection to the remote host localhost failed.Received the following error: Connection refused: no further information
    faultActor: null
    faultDetail:

    WSWS3713E: Connection to the remote host localhost failed.Received the following error: Connection refused: no further information
    at com.ibm.ws.webservices.engine.transport.http.HttpOutboundChannelConnection.connect(HttpOutboundChannelConnection.java:752)
    at com.ibm.ws.webservices.engine.transport.channel.OutboundConnectionGroup.createConnection(OutboundConnectionGroup.java:133)
    at com.ibm.ws.webservices.engine.transport.channel.OutboundConnectionCache.findGroupAndGetConnection(OutboundConnectionCache.java:331)
    at com.ibm.ws.webservices.engine.transport.http.HTTPSender.invoke(HTTPSender.java:510)
    at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:227)
    at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:227)
    at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:227)
    at com.ibm.ws.webservices.engine.WebServicesEngine.invoke(WebServicesEngine.java:332)
    at com.ibm.ws.webservices.engine.client.Connection.invokeEngine(Connection.java:738)
    at com.ibm.ws.webservices.engine.client.Connection.invoke(Connection.java:659)
    at com.ibm.ws.webservices.engine.client.Connection.invoke(Connection.java:617)
    at com.ibm.ws.webservices.engine.client.Connection.invoke(Connection.java:452)
    at com.ibm.ws.webservices.engine.client.Stub$Invoke.invoke(Stub.java:908)
    at com.ust_global.www.managecontract.binding.ManageContractBindingStub.addCustomerClubCardBP(ManageContractBindingStub.java)
    at com.ust.mdm.XMLTest.main(XMLTest.java)

    I have given the same URL as in the WSDL file from which I created the Client.

    Could you please help me out, since I am new to Web Service security :(

    Thanks a million for all ur help..
    Hi All,

    I rectified my problems...

    The issue was that my WS was not deploying properly to the Server and I did not disabled the webservices secuirty xml files. The URL to which my server was listening also different. With all the above changes, I was able to deploy MDM web services and got the result.

    Even my Composite Transaction WebService also got deployed. But I am gettting an error::
    java.lang.ClassNotFoundException: com.ustri.ibm.managecontract.service.to.convert.ManageContractServiceRequestParser / com.ustri.ibm.managecontract.service.to.convert.ManageContractServiceResponseConstructor

    I have mapped the parser and constructor to the Customer Resource properties file . Any idea?

    Thanks
  • SystemAdmin
    SystemAdmin
    938 Posts

    Re: Expose a Composite Transaction (Business Proxy) as a Web Service

    ‏2010-06-10T09:28:39Z  
    • rcher
    • ‏2010-06-09T08:09:51Z
    Hi All,

    I rectified my problems...

    The issue was that my WS was not deploying properly to the Server and I did not disabled the webservices secuirty xml files. The URL to which my server was listening also different. With all the above changes, I was able to deploy MDM web services and got the result.

    Even my Composite Transaction WebService also got deployed. But I am gettting an error::
    java.lang.ClassNotFoundException: com.ustri.ibm.managecontract.service.to.convert.ManageContractServiceRequestParser / com.ustri.ibm.managecontract.service.to.convert.ManageContractServiceResponseConstructor

    I have mapped the parser and constructor to the Customer Resource properties file . Any idea?

    Thanks
    Hi,

    Since the server is attempting to load your classes, you know that the properties are correct and are being loaded. So the issue is that the server cannot load the classes that are named in the properties.

    1. Check that the class names are actually the correct ones.
    2. Check that the classes exist - the Java source files are in your workspace and have been compiled into .class files (look on the file system).
    3. Check that your new modules are included in the MDM application - when the application is started, the WAS log should show your new modules being started.

    Hope that helps, Catherine.
  • rcher
    rcher
    49 Posts

    Re: Expose a Composite Transaction (Business Proxy) as a Web Service

    ‏2010-06-10T12:46:00Z  
    Hi,

    Since the server is attempting to load your classes, you know that the properties are correct and are being loaded. So the issue is that the server cannot load the classes that are named in the properties.

    1. Check that the class names are actually the correct ones.
    2. Check that the classes exist - the Java source files are in your workspace and have been compiled into .class files (look on the file system).
    3. Check that your new modules are included in the MDM application - when the application is started, the WAS log should show your new modules being started.

    Hope that helps, Catherine.
    Hi Catherine,

    Well, the classes for RequestParser and ResponseConstructor doesnot exist... Do we need to write the parser and constructor for Composite Transaction WS? Does it create any skeletons for these classes while generating WS code?

    Am confused!!!
  • SystemAdmin
    SystemAdmin
    938 Posts

    Re: Expose a Composite Transaction (Business Proxy) as a Web Service

    ‏2010-06-10T13:04:52Z  
    • rcher
    • ‏2010-06-10T12:46:00Z
    Hi Catherine,

    Well, the classes for RequestParser and ResponseConstructor doesnot exist... Do we need to write the parser and constructor for Composite Transaction WS? Does it create any skeletons for these classes while generating WS code?

    Am confused!!!
    Hi,

    They should have been generated along with the rest of the web service code, in the WS project, in the *.to.convert Java package. If web service generation failed with code generation errors then they could be missing, in which case you need to resolve the code generation problem.

    Catherine.
  • rcher
    rcher
    49 Posts

    Re: Expose a Composite Transaction (Business Proxy) as a Web Service

    ‏2010-06-30T07:03:54Z  
    Hi,

    They should have been generated along with the rest of the web service code, in the WS project, in the *.to.convert Java package. If web service generation failed with code generation errors then they could be missing, in which case you need to resolve the code generation problem.

    Catherine.
    Thanks a lot for your help Catherine..

    Now I have my composite service running successfully as a web service.. Still, i face some issue with the namespace while generating the code.. The current solution for that is I manually change the namespace..
  • ViswanathG
    ViswanathG
    19 Posts

    Re: Expose a Composite Transaction (Business Proxy) as a Web Service

    ‏2010-12-01T07:29:05Z  
    Hi,

    This question comes up frequently. Generation of skeleton code for business proxies and web service support is included in MDM Workbench v9.0.

    If you are using MDM 8.5, it is fairly straightforward to generate web service support for a business proxy:

    1. Create the equivalent transaction in a new MDM module using the exact same names as your BPs and generate the code.
    make sure you are using the exact same objects for inputs and ouputs

    This will generate the usual 5 projects:
    MyFakeBPModule
    MyFakeBPModuleEJB
    MyFakeBPModuleWS
    MyFakeBPModuleWSEJB
    MyFakeBPModuleWS_HTTPRouter

    2. Insert the two generated lines from MyFakeBPModule_DWLCommon_extension.properties into the DWLCommon_extension.properties.

    3. Delete the two Projects:
    MyFakeBPModule (back up the module.mdmxmi file somewhere else in case you want to repeat this process)
    MyFakeBPModuleEJB

    4. Redeploy, and you should be good to go.
    That is working only if your BP implementation is already in place and working obviously

    If you look at the implementation of the WebService Bean:
    MyFakeBPModuleServiceBean, the implementation of the operation matching your transaction name is as follow:

    return (XXXResponse)performServiceOperation(new Request("<your transaction name>", control, request));

    If the transaction name matches the one your BP is associated with name (and therefore it's a known transaction), the requestHandler will be able to find it.

    (With thanks to Julien Pradier)

    This becomes more complicated if the request/response objects for the transaction are not known to the workbench, but hopefully this should get you started.

    Catherine.
    Hi,

    Hi facing problem for How to expose Business proxy as web service. I am following below your steps. But I am not able to understand the first step. Can you explain in detail about the first step?

    1. Create the equivalent transaction in a new MDM module using the exact same names as your BPs and generate the code. make sure you are using the exact same objects for inputs and ouputs
  • rcher
    rcher
    49 Posts

    Re: Expose a Composite Transaction (Business Proxy) as a Web Service

    ‏2010-12-01T07:41:25Z  
    Hi,

    Hi facing problem for How to expose Business proxy as web service. I am following below your steps. But I am not able to understand the first step. Can you explain in detail about the first step?

    1. Create the equivalent transaction in a new MDM module using the exact same names as your BPs and generate the code. make sure you are using the exact same objects for inputs and ouputs
    Hi ,

    1. CReate a new MDM Module project and open the module.mdmxmi file
    2. Go to the model tab and right click the module . New-> MDM Txn / MDM Inq
    MDM Txn for Transaction service
    MDM Inq fro inquiry service
    3. Give the name of the Txn/Inq service same as your BP name.
    4. Give the same input and output objects as in your BP.

    Hope this helps.

    Thanks,
    Liz
  • ViswanathG
    ViswanathG
    19 Posts

    Re: Expose a Composite Transaction (Business Proxy) as a Web Service

    ‏2010-12-01T09:05:39Z  
    • rcher
    • ‏2010-12-01T07:41:25Z
    Hi ,

    1. CReate a new MDM Module project and open the module.mdmxmi file
    2. Go to the model tab and right click the module . New-> MDM Txn / MDM Inq
    MDM Txn for Transaction service
    MDM Inq fro inquiry service
    3. Give the name of the Txn/Inq service same as your BP name.
    4. Give the same input and output objects as in your BP.

    Hope this helps.

    Thanks,
    Liz
    Hi Thanks for your help,

    I am able to follow first three steps, But not able to follow 4th step.
    In the model tab I am not able to file where to menction input and output objects
    I am attaching same as screen shots.

    I would be great help for me if you calp how to proceed it.

    Can you you provide If you have any document on this?
    Thanks for help
  • rcher
    rcher
    49 Posts

    Re: Expose a Composite Transaction (Business Proxy) as a Web Service

    ‏2010-12-01T09:29:19Z  
    Hi Thanks for your help,

    I am able to follow first three steps, But not able to follow 4th step.
    In the model tab I am not able to file where to menction input and output objects
    I am attaching same as screen shots.

    I would be great help for me if you calp how to proceed it.

    Can you you provide If you have any document on this?
    Thanks for help
    Hi,

    You just need to define your input object in "Request Type" and output object in "Response Type" by selecting respectively from MDM Module and MDM Entity and do perform the action category which you require for the transaction.

    Hope it helps.

    Thanks.
  • ViswanathG
    ViswanathG
    19 Posts

    Re: Expose a Composite Transaction (Business Proxy) as a Web Service

    ‏2010-12-01T10:14:00Z  
    • rcher
    • ‏2010-12-01T09:29:19Z
    Hi,

    You just need to define your input object in "Request Type" and output object in "Response Type" by selecting respectively from MDM Module and MDM Entity and do perform the action category which you require for the transaction.

    Hope it helps.

    Thanks.
    Hi, Thanks Million for you help,

    I am able to follow below steps1 After clicking generate code link I am getting following error after creating some files.

    It shows "Retrieving JET Transformation bundle"

    Generating code... (24%)

    and after a half a minute shows the following error: java.lang.StackOverflowError

    I am not able resolve "java.lang.StackOverflowError".

    Can you help on this is possible.

    Thanks lot for spending time to resolve my issues.

    Thanks