2 Replies Latest reply on Dec 23, 2010 11:39 AM by garyp

    failed to create jaxb context

    garyp

      I created a web service client using wsconsume.  wrote a unit test and it worked fine.. could see the call going out and the data coming back..   I then created a custom Action for JBoss ESB to perform the call to the Web Service and this fails with "failed to create jaxb context"    Any ideas what might be causing the hangup when calling from an ESB action as opposed to the command line unit test client? (I copied the code over so I know it's the same client  code)..

       

      Thanks!

      Gary

        • 1. Re: failed to create jaxb context
          garyp

          ok so i discovered a couple of facts...  1. when the unit test worked I had the Service locator using a local version of the WSDL (c:\foo\bar\myservice.wsdl)...    I had changed this to the wsdl from the live running instance when I waned to deploy the client as a library jar in the ESB Action..    This WSDL produced on the fly by JBossWS came out different than the original that the Service and Clients we based on (top down service and client generation)..    Needless to say the client didn't match this (I kept getting a service not found as the namespace and service names didn't match)..  

           

          I tried to change the Service's annotation to include a WSDL location for the original WSDL file..  The service then failed to start (giving the same error about the namespace and service names not matching)..  

           

          So at this point I'm not sure what exactly I did wrong..  I used JBossWS to generate the Service from the WSDL file..  I then used JBossWS to produce the client from the same exact WSDL file..   Having the client point to the file on disk seemed to work ok..  But this only worked with absolute path.. not sure how to get it to work with relative paths within the JAR file..   Suggestions?

           

          thanks!

          Gary

          • 2. Re: failed to create jaxb context
            garyp

            OK.. So I solved this (not sure this is the correct solution but it works).. Basically I added the wsdl to the src folder of the client and just grabbed it from there..   

             

            So in the end the original posted issue was because the auto generated WSDL didn't conform to the original WSDL (not sure why).    Having the client use the original static WSDL solved it..

             

            Thanks

            Gary