Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Try this Maven plugin to generate classes from WSDL:</p> <pre><code>&lt;plugin&gt; &lt;groupId&gt;org.apache.cxf&lt;/groupId&gt; &lt;artifactId&gt;cxf-codegen-plugin&lt;/artifactId&gt; &lt;version&gt;2.6.0&lt;/version&gt; &lt;executions&gt; &lt;execution&gt; &lt;id&gt;generate-jaxb&lt;/id&gt; &lt;phase&gt;generate-sources&lt;/phase&gt; &lt;configuration&gt; &lt;additionalJvmArgs&gt;-Dfile.encoding=UTF8&lt;/additionalJvmArgs&gt; &lt;wsdlOptions&gt; &lt;wsdlOption&gt; &lt;wsdl&gt;src/main/resources/WSDL/esbWebService.wsdl&lt;/wsdl&gt; &lt;extraargs&gt; &lt;extraarg&gt;-exsh&lt;/extraarg&gt; &lt;extraarg&gt;true&lt;/extraarg&gt; &lt;extraarg&gt;-p&lt;/extraarg&gt; &lt;extraarg&gt;your.pkg&lt;/extraarg&gt; &lt;extraarg&gt;-wsdlLocation&lt;/extraarg&gt; &lt;extraarg&gt;&lt;/extraarg&gt; &lt;/extraargs&gt; &lt;/wsdlOption&gt; &lt;/wsdlOptions&gt; &lt;/configuration&gt; &lt;goals&gt; &lt;goal&gt;wsdl2java&lt;/goal&gt; &lt;/goals&gt; &lt;/execution&gt; &lt;/executions&gt; &lt;/plugin&gt; </code></pre> <p>Then use Spring to create a client. Something like this:</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd"&gt; &lt;jaxws:client id="yourService" address="http://your/web/service/url" serviceClass="your.generated.service.class.YourClass" username="inCaseYouNeedUsername" password="inCaseYouNeedPassword"/&gt; &lt;/beans&gt; </code></pre> <p>Then create a class and inject your service client:</p> <pre><code>@Component public class YourBean { @Autowired @Qualifier(value = "yourService") private YourService service; public void someMethod() { service.doSmth(); } } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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