cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Holger Stolzenberg" <h.stolzenb...@ewerk.com>
Subject Enforce complex type definition in WSDL
Date Tue, 21 Aug 2007 15:13:23 GMT
Hi folks,


Using CXF 2.0.1-INCUBATOR + JAXB Databinding:


I have a ProductService SEI with the following signature:

public ServiceStatus getProductById( int id );
public ServiceStatus getProductByToken( String token );


So for this WS the ServiceStatus object is defined in the WSDL. This ServiceStatus object
is a wrapper that holds the services status outcome, e.g. code ... , and the product itself
if loaded. For that it also has a geberic method

public Object getObject();

In an special use case this method should return an Object of the type lets say 'Product'.
Because the Product class itself has never been declared or used in the SEI it won´t show
up in the WSDL. But there I need the complex type definition for 'Product' in order to ensure
class mapping for a PHP client.

As a workaround I put the following method to the SEI:

public void noop( Product product );

Now the Product class has been declared in the SEI abd therefore a complex type definition
is created in the WSDL. Everything works fine now.

My question is how can I force the creation of a complex type in the WSDL that my service
may return but has not been declared or used somewhere in the
SEI??

Mit lieben Grüßen aus dem eWerk

  |  Holger Stolzenberg
  |  Softwareentwickler
  |
  |  Geschäftsführer: 
  |  Frank Richter, Erik Wende, Hendrik Schubert
  |
  |  eWerk IT GmbH
  |  Markt 16
  |  Leipzig 04109
  |  http://www.ewerk.com
  |  HRB 9065, AG Leipzig
  |  Hauptniederlassung Leipzig
  |
  |  fon +49.341.4 26 49-0
  |  fax +49.341.4 26 49-88
  |  mailto:h.stolzenberg@ewerk.com
  |
  |  Support:
  |  fon 0700 CALLME24 (0700 22556324)
  |  fax 0700 CALLME24 (0700 22556324)
  |
  | Auskünfte und Angebote per Mail
  | sind freibleibend und unverbindlich. 

Mime
View raw message