Announcement Announcement Module
Collapse
No announcement yet.
Axiom dependency version for Spring Web Services 2.0 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Axiom dependency version for Spring Web Services 2.0

    Hi all,

    What is the version of Apache Axiom to be used with 2.0. I'm trying to use Axiom 1.2.8 and it is throwing some method not found error.

    I've a annotated end point as given below.
    Code:
    @PayloadRoot(localPart = "employeeUpdateRequest", namespace = "http://www.example.org/goservices-ws")
    @ResponsePayload
    public EmployeeUpdateResponse update(
    		@RequestPayload EmployeeUpdateRequest request,
    		MessageContext messageContext) throws EncryptionException {
    	if (log.isInfoEnabled()) {
    		log.info("Inside UpdateEnabledStatusEndpoint");
    	}
    
    	EmployeeUpdateResponse response = new EmployeeUpdateResponse();
    
    	return response;
    }
    .

    The request is successfully reaching my endpoint but when I returns the response it is throwing an methodnotfounderror.
    Code:
    java.lang.NoSuchMethodError: org.apache.axiom.soap.SOAPFactory.createOMElement(Lorg/apache/axiom/om/OMDataSource;Ljavax/xml/namespace/QName;)Lorg/apache/axiom/om/OMSourcedElement;
    	at org.springframework.ws.soap.axiom.AxiomSoapBody.setStreamingPayload(AxiomSoapBody.java:71)
    	at org.springframework.ws.soap.axiom.AxiomSoapMessage.setStreamingPayload(AxiomSoapMessage.java:175)
    	at org.springframework.ws.server.endpoint.adapter.method.jaxb.AbstractJaxb2PayloadMethodProcessor.marshalToResponsePayload(AbstractJaxb2PayloadMethodProcessor.java:93)
    	at org.springframework.ws.server.endpoint.adapter.method.jaxb.XmlRootElementPayloadMethodProcessor.handleReturnValue(XmlRootElementPayloadMethodProcessor.java:66)
    	at org.springframework.ws.server.endpoint.adapter.DefaultMethodEndpointAdapter.handleMethodReturnValue(DefaultMethodEndpointAdapter.java:284)
    	at org.springframework.ws.server.endpoint.adapter.DefaultMethodEndpointAdapter.invokeInternal(DefaultMethodEndpointAdapter.java:237)
    	at org.springframework.ws.server.endpoint.adapter.AbstractMethodEndpointAdapter.invoke(AbstractMethodEndpointAdapter.java:53)
    	at org.springframework.ws.server.MessageDispatcher.dispatch(MessageDispatcher.java:230)
    	at org.springframework.ws.server.MessageDispatcher.receive(MessageDispatcher.java:172)
    .

    What is the reason for it? How can I solve this?

    Thank you.

  • #2
    Spring-WS depends on Axiom 1.2.9 (you can check parent/pom.xml for dependencies and versions). Updating to this version should solve you problem.

    Comment


    • #3
      Thank Mr. Tareq. It worked fine.

      Comment

      Working...
      X