views:

58

answers:

2

Hi.

I have a web service built by Java, and deployed on two application servers named "GlassFish" and "JBoss". now when we get the WSDL from them, each application server produce different format of WSDL, that .NET wsdl.exe tool generates different object models and proxy classes. so i can't use same client .NET codes to invoke both application server web services. what's the matter? what should i do?

Thanks.

A: 

Perhaps the implementations of JAX-WS and JAXB are different, hence producing different results. You have two options:

  • be WSDL-first. Generate your WSDL and use it as a basis of your services. It will be hard to move to that paradigm though
  • Replace the appropriate jars (jax-ws/jaxb) in one of the app servers with those from the other. Preferably don't replace them centrally, but rather configure the app server to use the new ones (on glassfish put them in endorsed for instance)

Ultimately, I think it will be wise to use only one application server. Multiple problems like this may arise.

Bozho
thanks , i'll try that.
A: 

I would bet one is working with Axis1 libraries and the other is using Axis2, check in the wsdl generated the wsdl specification they are using (look at the prolog, the part at the beginning of the wsdl).

By the way, you should study in detail the wsdl specifications, your scenario is beyond your teorical knowledge.

http://www.w3.org/TR/wsdl

http://www.w3.org/TR/wsdl20/

Raul Lapeira Herrero
thanks , i'll try that.