Announcement Announcement Module
Collapse
No announcement yet.
New simple SpringWS 2.0: SOAP-ENV:Server No adapter for endpoint Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • New simple SpringWS 2.0: SOAP-ENV:Server No adapter for endpoint

    Hi,
    I'm learning SpringWS 2.0. I set up a simple End Point as an exercise to see how things flow. I got the SOAP Fault on the server side.
    What did I miss? 1M Thanks.

    @Endpoint
    public class BankingSIB {
    private static final String NAMESPACE_URI = "http://ci.test/";
    private static final String GETBALANCE = "getBalance";

    @PayloadRoot(localPart = GETBALANCE, namespace = NAMESPACE_URI)
    @ResponsePayload
    @Namespace(prefix = "ci", uri=NAMESPACE_URI)
    public Double getBalance(@XPathParam("/ci:getBalance/arg0") Long acctno, @XPathParam("/ci:getBalance/arg1") Long secno) throws SocialSecurityException, AccountNumberException {
    }
    }

    SOAP request
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ci="http://ci.test/">
    [INDENT=2]<soapenv:Header/>
    <soapenv:Body>[/INDENT][INDENT=3]<ci:getBalance>
    <!--Optional:-->
    <!--type: long-->
    <arg0>10</arg0>
    <!--Optional:-->
    <!--type: long-->
    <arg1>10</arg1>
    </ci:getBalance>[/INDENT][INDENT=2]</soapenv:Body>[/INDENT]
    </soapenv:Envelope>
    SOAP response
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP-ENV:Header/>
    <SOAP-ENV:Body>
    <SOAP-ENV:Fault>
    <faultcode>SOAP-ENV:Server</faultcode>
    <faultstring xml:lang="en">No adapter for endpoint [public java.lang.Double test.ci.BankingSIB.getBalance(java.lang.Long,java. lang.Long) throws test.exception.SocialSecurityException,test.except ion.AccountNumberException]: Is your endpoint annotated with @Endpoint, or does it implement a supported interface like MessageHandler or PayloadEndpoint?</faultstring>
    </SOAP-ENV:Fault>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>

  • #2
    1. log4j.logger.org.springframework.ws=TRACE
    2. Then DefaultMethodEndpointAdapter
    3. Then
    protected boolean supportsInternal(MethodEndpoint methodEndpoint)
    {
    return (supportsParameters(methodEndpoint.getMethodParame ters())) && (supportsReturnType(methodEndpoint.getReturnType() ));
    }

    supportsReturnType(methodEndpoint.getReturnType() is the issue.

    return type Double is not supported

    4. Then see doc 2) 5.4.1.2. Handling method return types
    confirmed 3.

    http://static.springsource.org/sprin...tml/index.html

    5.4.1.2. Handling method return types

    5. Changed from Double to void for 1 quick test and no more error.

    Comment

    Working...
    X