I am trying to get a stand alone Java 6 Spring WS service working, using JAXB2 for marshalling and unmarshalling the requests. The server starts with no issues and I'm using a Spring WS client. The client attempts to send the message (without any JAXB2 errors), but then gets the following SOAPFaultException:
My end point is configured pretty standard:Code:Exception in thread "main" org.springframework.ws.soap.client.SoapFaultClientException: No adapter for endpoint [com.ngc.esl.seam.anm.ws.AnmServiceEndpoint@559b808a]: Is your endpoint annotated with @Endpoint, or does it implement a supported interface like MessageHandler or PayloadEndpoint? at org.springframework.ws.soap.client.core.SoapFaultMessageResolver.resolveFault(SoapFaultMessageResolver.java:37) at org.springframework.ws.client.core.WebServiceTemplate.handleFault(WebServiceTemplate.java:774) at org.springframework.ws.client.core.WebServiceTemplate.doSendAndReceive(WebServiceTemplate.java:600) at org.springframework.ws.client.core.WebServiceTemplate.sendAndReceive(WebServiceTemplate.java:537) at org.springframework.ws.client.core.WebServiceTemplate.marshalSendAndReceive(WebServiceTemplate.java:384) at org.springframework.ws.client.core.WebServiceTemplate.marshalSendAndReceive(WebServiceTemplate.java:378) at org.springframework.ws.client.core.WebServiceTemplate.marshalSendAndReceive(WebServiceTemplate.java:370) at com.ngc.esl.seam.anm.ws.AnmServiceTest.sendAimsConfiguration(AnmServiceTest.java:75) at com.ngc.esl.seam.anm.ws.AnmServiceTest.main(AnmServiceTest.java:83)
Here is my application context file:Code:@Endpoint public class AnmServiceEndpoint { @Autowired private AnmService anmService; public void setAnmService(AnmService anmService) { this.anmService = anmService; } @PayloadRoot(localPart = "ConfigureAimsRequest") public void configureAims(@RequestPayload ConfigurationType aimsConfiguration){ anmService.configureAims(aimsConfiguration); } }
So, as you can see, I have the Endpoint defined (I believe) correctly and my context file sets a handler with an adapter for the JAXB2 stuff. So, at this point, not sure what is incorrect and causing my issue.Code:<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" 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"> <sws:annotation-driven /> <bean id="anmServiceEndpoint" class="com.ngc.esl.seam.anm.ws.AnmServiceEndpoint"> <property name="anmService"><ref bean="anmService"/></property> </bean> <bean id="anmService" class="com.ngc.esl.seam.anm.ws.AnmServiceImpl"/> <bean id="messageFactory" class="org.springframework.ws.soap.saaj.SaajSoapMessageFactory"/> <bean id="messageReceiver" class="org.springframework.ws.soap.server.SoapMessageDispatcher"> <property name="endpointAdapters"> <bean class="org.springframework.ws.server.endpoint.adapter.GenericMarshallingMethodEndpointAdapter"> <property name="marshaller" ref="marshaller"/> <property name="unmarshaller" ref="marshaller"/> </bean> </property> <property name="endpointMappings" ref="endpointMapping"/> </bean> <bean id="endpointMapping" class="org.springframework.ws.server.endpoint.mapping.PayloadRootQNameEndpointMapping"> <property name="defaultEndpoint" ref="anmServiceEndpoint" /> </bean> <bean id="httpServer" class="org.springframework.remoting.support.SimpleHttpServerFactoryBean"> <property name="contexts"> <map> <entry key="/AnmService" value-ref="soapHandler"/> </map> </property> </bean> <bean id="marshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshaller"> <property name="schema" value="classpath:anmServiceMethods.xsd"/> <property name="packagesToScan" value="com.ngc.esl.seam.anm.jaxb" /> </bean> <bean id="soapHandler" class="org.springframework.ws.transport.http.WebServiceMessageReceiverHttpHandler"> <property name="messageFactory" ref="messageFactory"/> <property name="messageReceiver" ref="messageReceiver"/> </bean> </beans>
Any help would be appreciated. I can also provide my schema XSDs too, but they are pretty big, so didn't want to necessarily take up the space with them if not needed.
Thanks,
Andrew


Reply With Quote