File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Services and the fly likes HttpSOAPConnectionFactory not found Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "HttpSOAPConnectionFactory not found" Watch "HttpSOAPConnectionFactory not found" New topic

HttpSOAPConnectionFactory not found

Navin Keswani

Joined: Jun 08, 2004
Posts: 17
Hi Guys,

I am getting the following error below when I am trying to create a simple SOAPConnection.

I have no clue why is it looking for HttpSOAPConnectionFactory when I am not even using it. I just use the simple SOAPConnection.

The code is very simple i.e just creating a SOAPConection.

The below code I have written it in a Managed Bean. We are using JSF as the framework.

SOAPConnectionFactory scFactory = SOAPConnectionFactory.newInstance();
con = scFactory.createConnection();
}catch (Exception e) {
System.out.println("ERROR: There was a problem in opening a connection.");

Would Appreciate any help on this.

javax.xml.soap.SOAPException: Unable to create SOAP connection factory: Provider com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnectionFactory not found
at javax.xml.soap.SOAPConnectionFactory.newInstance()Ljavax.xml.soap.SOAPConnectionFactory;(Unknown Source)
at com.gaic.controller.DCView.runManuscriptAction(
at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object Ljava.lang.Object;(Unknown Source)
at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source)
at org.apache.myfaces.el.MethodBindingImpl.invoke(
at org.apache.myfaces.application.ActionListenerImpl.processAction(
at javax.faces.component.UICommand.broadcast(
at javax.faces.component.UIViewRoot._broadcastForPhase(
at javax.faces.component.UIViewRoot.processApplication(
at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(
at org.apache.myfaces.lifecycle.LifecycleImpl.execute(
at javax.faces.webapp.FacesServlet.service(
at weblogic.servlet.internal.StubSecurityHelper$
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(
at weblogic.servlet.internal.ServletStubImpl.execute(
at weblogic.servlet.internal.TailFilter.doFilter(
at weblogic.servlet.internal.FilterChainImpl.doFilter(
at org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(
at weblogic.servlet.internal.FilterChainImpl.doFilter(
at weblogic.servlet.internal.WebAppServletContext$
at weblogic.servlet.internal.WebAppServletContext.securedExecute(
at weblogic.servlet.internal.WebAppServletContext.execute(

Navin Keswani
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
SOAPConnection is just an interface - HttpSOAPConnection provides the actual implementation class for SOAP calls over HTTP.

It sounds as if you're missing a jar file. SOAPConnection is probably in "saaj.jar", but that jar doesn't contain the Sun classes. Hunt around for a jar file that contains the com.sun.xml.messaging.saaj package, and make sure it's in your classpath.
I agree. Here's the link:
subject: HttpSOAPConnectionFactory not found
It's not a secret anymore!