Hello,

I would be kind to help me with my question. As the CFX Website states in
the (WSDL2Java) "Consumer" examples, for a Consumer it is always necessary
to have the "Original" WSDL File available from whicht the Code was
generated. This WSDL is either passed (see cited text below) via the
Parametered-Constructor or seems to be implicitly called at the original
adress if the Service ist instanciated via the default Constructor. (The
Code generated by CXF WSDL2Java seems to generate a static member with the
URL and then uses the parametered Constructor for Instanciation...)

1. Isn't that an enourmous waste of resources if the WSDL file is called for
every (or at least the first) invocation (in case this url is cached
somehow)?
2. What is the idea behind the retrieval of the WSDL file? As the client
Code has already been generated via WSDL2Java any change in the WSDL file
can't be "integrated" in the code anymore. The code is static and compiled
and has all the information needed to run properly(?) Why is the WSDL file
useful here and retrieved at all?

I spent a lot of thinking about that but was not able to figure this out.

Thank you very much!
Jens


#### Cited from: http://cwiki.apache.org/CXF20DOC/developing-a-consumer.html####


public class ServiceName extends javax.xml.ws.Service
{
  ...
  public ServiceName(URL wsdlLocation, QName serviceName) { }

  public ServiceName() { }

  public Greeter getPortName() { }
  .
  .
  .
}

 The ServiceName class in
Example2<http://cwiki.apache.org/CXF20DOC/developing-a-consumer.html#DevelopingaConsumer-Example2>defines
the following methods:

   - Constructor methods - the following forms of constructor are defined:
      - *ServiceName*(URL *wsdlLocation*, QName *serviceName*) constructs a
      service object based on the data in the *serviceName* service in the
      WSDL contract that is obtainable from *wsdlLocation*.
      - *ServiceName*() is the default constructor, which constructs a
      service object based on the service name and WSDL contract that were
      provided at the time the stub code was generated (for example,
when running
      the CeltiXfire wsdl2java command). Using this constructor
presupposes that
      the WSDL contract remains available at its original location.

##########

Reply via email to