I found this exception when i tried to create a SOAPConnectionFactory


javax.xml.soap.SOAPException: Unable to create SOAP connection factory: com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConn ectionFactory cannot be cast to javax.xml.soap.SOAPConnectionFactory
at javax.xml.soap.SOAPConnectionFactory.newInstance(S OAPConnectionFactory.java:77)
at org.openmrs.module.wsclient.web.ClientRequestFormC ontroller.formBackingObject(ClientRequestFormContr oller.java:61)
at org.springframework.web.servlet.mvc.AbstractFormCo ntroller.getErrorsForNewForm(AbstractFormControlle r.java:358)
at org.springframework.web.servlet.mvc.AbstractFormCo ntroller.showNewForm(AbstractFormController.java:3 38)
at org.springframework.web.servlet.mvc.AbstractFormCo ntroller.handleRequestInternal(AbstractFormControl ler.java:278)
at org.springframework.web.servlet.mvc.AbstractContro ller.handleRequest(AbstractController.java:153)
at org.springframework.web.servlet.mvc.SimpleControll erHandlerAdapter.handle(SimpleControllerHandlerAda pter.java:48)
at org.springframework.web.servlet.DispatcherServlet. doDispatch(DispatcherServlet.java:875)
at org.springframework.web.servlet.DispatcherServlet. doService(DispatcherServlet.java:807)
at org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:571)
at org.springframework.web.servlet.FrameworkServlet.d oGet(FrameworkServlet.java:501)



When i use the save code in Java application it works but in web application this error returns why ?