• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JAX-ws client reporting my service is not a valid service! Help!!

 
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm having some problems with a webservice stub generated by wsimport. Basically it's giving me this indecipherable (to me) error:



This is strange to me because I just generated the UserWS class withwsimport. Also because I have no idea what this cryptic error message means.

So what I'd like to do (barring one of you experts, like Peer, explaining what the hell this means), is to somehow log the SOAP request and response sent/received by the web service proxy (although it looks like it never gets that far...). Is there some way to do this?

One more tidbit: This error appears only on specific client machines. Running the same request using SoapUI, the request processes correctly. (no problems)

EDIT: In case a bit of code helps (and it always does), here is the offending line from com.foo.services.user.UserWS.java:

And here's the calling code:
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

{http://www.foo.com/services/}UserWS is not a valid service.


This sounds like the code may be accessing the wrong URL.
 
Philippe Desrosiers
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ulf,

I thought that too, but this occurs in the constructor of the service proxy, before any URL is called (I think)...
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, it's incorrect no matter where it occurs, isn't it?
 
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Philippe Desrosiers wrote:One more tidbit: This error appears only on specific client machines.


This strongly suggests that the problem is somewhere in the runtime environment.
  • Do they have the same version of Java or more importantly the same version of JAX-WS/JAXB
  • Are the various environment variables properly set? JAVA_HOME, CLASSPATH, possibly even the order of the jar archive files in the CLASSPATH variable(s)


  • log the SOAP request and response sent/received by the web service proxy (although it looks like it never gets that far...). Is there some way to do this?


    You can use Apache TCPMon (Tutorial) or java.net tcpmon to capture/view the HTTP request/response pairs. However I doubt that it will help in this case. Note that in the case of JAX-WS you will have to make a local copy of the WSDL and modify the endpoint address to point to tcpmon and then modify the web service proxy creation to use that local WSDL.



    This is peculiar - I've only ever seen it use the single String parameter on the URL. However you could easily bypass that by using:



    Philippe Desrosiers wrote:this occurs in the constructor of the service proxy, before any URL is called (I think)...


    This could very well happen after the proxy reads the WSDL to get the web service endpoint address. It is not complaining that it couldn't read the WSDL ... it is complaining that it can't find UserWS in the {http://schemas.xmlsoap.org/wsdl/}service element of the WSDL even though it clearly is there.

    So I'd also try the client using a local copy of the WSDL rather than the one over the network - just in case it makes a difference.
     
    Philippe Desrosiers
    Ranch Hand
    Posts: 138
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Hi Peer,

    As usual, you are perfectly correct. This issue only occurs on a specific development machine, with a highly suspect Java installation. Basically, the developer (new to Windows Java), tried to clean out older JRE and JDK installations by simply deleting them, then re-installed JDK 1.6.0_11. So now there's a bunch of Registry issues, DLLs that can't be found, etc.

    Thanks!
     
    Philippe Desrosiers
    Ranch Hand
    Posts: 138
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    Ulf Dittmer wrote:Well, it's incorrect no matter where it occurs, isn't it?



    LOL. Yes. But in my experience, incorrect code won't often throw an exception if it's never called...
     
    reply
      Bookmark Topic Watch Topic
    • New Topic