I'm trying to use StAX with Spring WS 2.0.2 but I'm not having any luck getting it working. I found an example online here but it uses AbstractStaxStreamPayloadEndpoint which is now deprecated in Spring WS 2.x. I'm trying to use the @Endpoint annotation approach but I am getting the following error:
And here is the code for my endpoint:HTML Code:<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 void com.endpoint.AddressTypeEndpoint.handleReadAddressTypeRequest(javax.xml.stream.XMLStreamReader,javax.xml.stream.XMLStreamWriter) throws java.lang.Exception]: 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>
Does anyone know how I can use StAX with Spring WS, using @Endpoint?Code:package com.endpoint; import javax.xml.stream.XMLStreamReader; import javax.xml.stream.XMLStreamWriter; import org.springframework.ws.server.endpoint.annotation.Endpoint; import org.springframework.ws.server.endpoint.annotation.PayloadRoot; @Endpoint public class AddressTypeEndpoint { private static final String NAMESPACE_URI = "http://client/AddressType"; @PayloadRoot(namespace = NAMESPACE_URI, localPart = "ReadAddressTypeRequest") public void handleReadAddressTypeRequest(XMLStreamReader streamreader, XMLStreamWriter streamwriter) throws Exception { System.out.println("Got to the endpoint"); } }


Reply With Quote
