Note that there are some explanatory texts on larger screens.

plurals
  1. POSpring WS + JIBX "No adapter for endpoint" Error
    primarykey
    data
    text
    <p>I use <strong>JIBX</strong> to create my entity classes from XSD files. It is configured in pom.xml and creates classes when I do a "maven: compile"</p> <p>I also use spring-ws. When I test my web service with SOAPUI I get the infamous error; </p> <pre><code>"No adapter for endpoint GetTransactionsResponse getTransactions(GetTransactionsRequest), Is your endpoint annotated with @Endpoint, or does.." </code></pre> <p>I checked all the threads here about that error but didn't help.</p> <p>I have one Parent.xsd and it imports 2 child xsd's. They are all in the same folder. This is how my spring-ws-servlet looks like;</p> <pre><code>&lt;beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:sws="http://www.springframework.org/schema/web-services" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/web-services http://www.springframework.org/schema/web-services/web-services-2.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd"&gt; &lt;bean name="xsdCollection" class="org.springframework.xml.xsd.commons.CommonsXsdSchemaCollection"&gt; &lt;property name="xsds"&gt; &lt;list&gt; &lt;value&gt;/WEB-INF/Parent.xsd&lt;/value&gt; &lt;/list&gt; &lt;/property&gt; &lt;/bean&gt; &lt;context:component-scan base-package="mypackage"/&gt; &lt;sws:annotation-driven/&gt; &lt;sws:dynamic-wsdl id="my" portTypeName="myResource" locationUri="/ws/my" targetNamespace="myschame"&gt; &lt;sws:xsd location="/WEB-INF/Parent.xsd"/&gt; &lt;/sws:dynamic-wsdl&gt; &lt;sws:interceptors&gt; &lt;bean class="org.springframework.ws.soap.server.endpoint.interceptor.SoapEnvelopeLoggingInterceptor"&gt; &lt;property name="logRequest" value="true"/&gt; &lt;property name="logResponse" value="true"/&gt; &lt;/bean&gt; &lt;bean class="org.springframework.ws.soap.server.endpoint.interceptor.PayloadValidatingInterceptor"&gt; &lt;property name="xsdSchemaCollection" ref="xsdCollection"/&gt; &lt;property name="validateRequest" value="true"/&gt; &lt;property name="validateResponse" value="true"/&gt; &lt;/bean&gt; &lt;/sws:interceptors&gt; </code></pre> <p></p> <p>This is my endpoint class;</p> <pre><code>@Endpoint public class TransactionsEndpoint { public static final String NAMESPACE = "nmapespace"; @PayloadRoot(namespace = NAMESPACE, localPart = "getTransactionsRequest") @ResponsePayload public GetTransactionsResponse getTransactions(@RequestPayload GetTransactionsRequest request) { GetTransactionsResponse transactionsResponse = new GetTransactionsResponse(); return transactionsResponse; } } </code></pre> <p>GetTransactionsResponse/Request classes created by JIBX.</p> <p>My wsdl looks like this;</p> <pre><code> &lt;wsdl:operation name="getTransactions"&gt;&lt;wsdl:input message="tns:getTransactionsRequest" name="getTransactionsRequest"&gt; &lt;/wsdl:input&gt;&lt;wsdl:output message="tns:getTransactionsResponse" name="getTransactionsResponse"&gt; &lt;/wsdl:output&gt;&lt;/wsdl:operation&gt; </code></pre> <p>pom file is;</p> <pre><code> &lt;dependency&gt; &lt;groupId&gt;org.springframework.ws&lt;/groupId&gt; &lt;artifactId&gt;spring-ws-core&lt;/artifactId&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;org.apache.ws.xmlschema&lt;/groupId&gt; &lt;artifactId&gt;xmlschema-core&lt;/artifactId&gt; &lt;version&gt;2.0.2&lt;/version&gt; &lt;/dependency&gt; </code></pre> <p>I am not sure if the problem is because there are 3 xsd files and something goes wrong between those or it is a configuration problem with JIBX because When I try to use JAXB instead of JIBX, it worked! </p>
    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.
 

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