users@glassfish.java.net

Re: RE: Shared XSD for WSDL

From: <glassfish_at_javadesktop.org>
Date: Fri, 26 Sep 2008 05:24:39 PDT

Ok I have figured it out but it is a two fold fix. If anyone knows a cleaner way please let me know.

1) On the endpointinterface define the targetNamespace
@WebService(targetNamespace = "http://services.myshop.com")

Add this to every endPointInterface that you objects shared. This means that the WSDL namespace will be shared across all wsdls

2) For visual studio clients you need to use the wsdl tool (configure it as an external tool) and use the following arguments file structure
<wsdlParameters xmlns="http://microsoft.com/webReference/">
        <nologo>true</nologo>
        <parsableerrors>true</parsableerrors>
        <sharetypes>true</sharetypes>
        <namespace>MyServices.ServiceDefinition</namespace>
  <out>ServiceReference/MyServices.cs</out>
<documents>
        <document>http://server:port/wsdlreference1?wsdl</document>
        <document>http://server:port/wsdlreference2?wsdl</document>
</documents>
</wsdlParameters>

This will force the generator to generate the client stubs and share the objects.
My head hurts
HTH
[Message sent by forum member 'rabiddog5150' (rabiddog5150)]

http://forums.java.net/jive/thread.jspa?messageID=301811