Results 1 to 2 of 2

Thread: Using StAX with @Endpoint

  1. #1
    Join Date
    Jun 2011
    Posts
    1

    Default Using StAX with @Endpoint

    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:

    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>
    And here is the code for my 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");
    	}
    }
    Does anyone know how I can use StAX with Spring WS, using @Endpoint?
    Last edited by amd2002a; Jun 9th, 2011 at 09:10 AM.

  2. #2
    Join Date
    Aug 2011
    Posts
    6

    Default

    Is there a anwser to this?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •