Hi Christian,
Comments inline!
Hi Adrian,
first thanks for your comments. I apreciate your help. I know it is
possible to configure these things and I will add the description of
how to do this.
Sounds good. My motivation behind this is simply that the default
naming schemes used in JAX-WS to WSDL mapping, when put through other
WSDL-to-* code generators, can generate code that is awkward to use.
But I myself are not using endpoint, service and binding on the
client and server side. I only use the porttype to get my code. That
is because we use SOAP/JMS and this is not possible to describe in a
compatible way in WSDL so it can be used across the main platforms
we use. (Java, Tibco BW and .Net).
Fair enough.
The other thing with service endpoints is that we have different
servers for develop, test and production. So one address in the wsdl
would be no help. Do you have any idea how to handle this? Currently
we configure the jms or http server address in a config file for the
deployment so the admin can adjust it at runtime.
I'm all for services having a good logical QName, like {http://my.org/services
}/MyService that is the same regardless of whether you're in
production, test or development. In terms of your naming strategy for
endpoints (ports), you could have a separate port for each of your
production, test and dev instances. I prefer to use a naming strategy
that describes the binding and transport, for example, "SOAPOverHTTP"
or "XMLOverJMS" as I think it better describes what the port actually
is.
As for the actual address information, I think that just shouldn't be
in the WSDL at all! I prefer to put a simple placeholder in the
addressing information, that I can then override (as you do!) from
configuration in a properties file or some other configuration system.
The placeholder could just be an empty URL; one approach that I have
seen is that the default URL points to a stub or mock services hosted
somewhere in system test: this means that new users who want to play
with the service can do so very easily without risking breakage.
Hope that helps!
Best,
Ade
Best regards,
Christian
Adrian Trenaman schrieb:
Hi Christian,
Thanks for the contribution! Usually I stay away from code-first,
but I do see the value in using the Java interface as a DSL. I
think though that your page should include notes on how to use the
JAX-WS attributes to do more, like:
* specify the portType name
* specify the kind of binding
* specify the name of the endpoint
* specify the name of the service
.... for me, good naming in the WSDL file makes for better
reusability and a more aesthetic foundation for a service.
Best,
Ade
----------------------------
IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland