Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>the easiest way to avoid slow retrieval of the remote WSDL when you instantiate your SEI is to not retrieve the WSDL from the remote service endpoint at runtime. </p> <p>this means that you have to update your local WSDL copy any time the service provider makes an impacting change, but it also means that you have to update your local copy any time the service provider makes an impacting change.</p> <p>When I generate my client stubs, I tell the JAX-WS runtime to annotate the SEI in such a way that it will read the WSDL from a pre-determined location on the classpath. by default the location is relative to the package location of the Service SEI</p> <hr> <pre><code>&lt;wsimport sourcedestdir="${dao.helter.dir}/build/generated" destdir="${dao.helter.dir}/build/bin/generated" wsdl="${dao.helter.dir}/src/resources/schema/helter/helterHttpServices.wsdl" wsdlLocation="./wsdl/helterHttpServices.wsdl" package="com.helter.esp.dao.helter.jaxws" &gt; &lt;binding dir="${dao.helter.dir}/src/resources/schema/helter" includes="*.xsd"/&gt; &lt;/wsimport&gt; &lt;copy todir="${dao.helter.dir}/build/bin/generated/com/helter/esp/dao/helter/jaxws/wsdl"&gt; &lt;fileset dir="${dao.helter.dir}/src/resources/schema/helter" includes="*" /&gt; &lt;/copy&gt; </code></pre> <hr> <p>the wsldLocation attribute tells the SEI where is can find the WSDL, and the copy makes sure that the wsdl (and supporting xsd.. etc..) is in the correct location. </p> <p>since the location is relative to the SEI's package location, we create a new sub-package (directory) called wsdl, and copy all the wsdl artifacts there.</p> <p>all you have to do at this point is make sure you include all *.wsdl, *.xsd in addition to all *.class when you create your client-stub artifact jar file.</p> <p>(in case your curious, the @webserviceClient annotation is where this wsdl location is actually set in the java code</p> <pre><code>@WebServiceClient(name = "httpServices", targetNamespace = "http://www.helter.com/schema/helter/httpServices", wsdlLocation = "./wsdl/helterHttpServices.wsdl") </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload