• 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 ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
  • Piet Souris
  • Himai Minh

JBoss WSDL - custom schema types issues

Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there a way to configure how WSDL is genreated by JBOss?

JBoss + EJB3.
Web service with simple: @WebService()

WSDL auto generated on JBOSS startup.

Using it in JAVA clients works fine (@WebServiceRef).

But issue is with .NET - Visual Studion generates number of unnecessary classes wrapping simple types.

Cause: generated WSDL has schema defining new type for each element.
<xs:element name="submitApplication" type="tns:submitApplication"/>
<xs:complexType name="submitApplication">
<xs:element minOccurs="0" name="applicationXMLAsString" type="xs:string"/>

Another WSDL generated by some Apache tools (another project) produces WSDL having:

<s:element name="createApplication">
<s:element name="applicationForDocument" type="s:string" />

And .NET studio generates expected classes form latter one.

Regardless of is this a .NET issue and could it be solved on that side, can I produce WSDL that will produce format .NET expects?

I see that both approach describe the same thing, but can I force JBOSS somehow to avoid generating new types when they are not necessary?
Posts: 2968
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Dejan Mratinkovic:can I produce WSDL that will produce format .NET expects?

By starting with the WSDL, developing your web service contract first - right now you are developing contract-last. There are some attributes in the web service annotations that let you control some aspects of the WSDL - but that control is nowhere near what you have once you go contract-first.

Also the service has no control over the client generated artifacts - so there are no "right" classes on the client side. The WSDL defines the SOAP requests and responses that are supported by the web service - it isn't some arcane "object definition language". How the client chooses to represent your service's interface based on that WSDL is entirely the client's business.

See also Bottom-up or Top-down and JAX-RPC to JAX-WS (Client impact).
Never trust an airline that limits their passengers to one carry on iguana. Put this tiny ad in your shoe:
Free, earth friendly heat - from the CodeRanch trailboss
    Bookmark Topic Watch Topic
  • New Topic