Troubleshooting

If you came here then something has gone wrong. Let's see whether we can help you find what's causing the problem and fix it. Yes, the stuff does work and yes the samples do work .. at least for us :-). Now let's try to make them work for you.

The table below has a list of common problems and possible solutions. Do you see your problem listed?

Problem Comments
org.w3c.dom.Node: method getNamespaceURI()Ljava/lang/String; not found Classpath is not set correctly: you still have some old parser or some other JAR file that has the org.w3c.dom.* classes ahead of a non-namespace aware parser. Please follow the installation instructions carefully again and verify you did everything right. If you start the server on a command line, type "javap org.w3c.dom.Node" and see whether you see

public abstract java.lang.String getNamespaceURI();

in the output. If not, you still have a problem. Even if you do, you still have to make sure that your server configuration does not introduce some other parser ahead of the user classpath at startup time. (The default setup in Tomcat does this, for example.)

Exception in thread "main" java.lang.NoClassDefFoundError: javax/activation/DataSource Classpath is not set correctly: add activation.jar from Java Activation Framework to your classpath.
Exception in thread "main" java.lang.NoClassDefFoundError: javax/mail/MessagingException Classpath is not set correctly: add mail.jar from JavaMail to your classpath.
Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/parsers/DocumentBuilderFactory Class is not set correctly: add a JAXP compatible, namespace-aware XML parser such as Apache Xerces to your classpath.
Exception in thread "main" [SOAPException: faultCode=SOAP-ENV:Client; msg=Error opening socket: connect (code=10061); targetException=java.lang.IllegalArgumentException: Error opening socket: connect (code=10061)] The router URL you are using is incorrect or you have not started the server. Basically the problem is there's nothing listening at the host/port combination you are connecting to. Try pointing a Web browser to the router URL- you should see what's indicated in the installation tests.
Exception in thread "main" [SOAPException: faultCode=SOAP-ENV:Protocol; msg=Unsupported response content type "text/html", must be: "text/xml". Response was: ... The router URL you are using is incorrect. Basically the problem is that the server is not sending back text/xml as SOAP expects and is sending something else. Try pointing a Web browser to the router URL- you should see what's indicated in the installation tests.
service 'XYZ' unknown The service is not deployed - list deployed services and see whether the service XYZ is deployed.
Unable to resolve target object: XYZ The service implementation class could not be loaded or a new instance of it could not be created. Basically the problem is that there is a classpath or other problem that prevents the server side from properly locating the object to deliver calls to. The detailed problem may be indicated within the <stackTrace> element found inside the <detail> element of the <SOAP:Fault> that was returned with the SOAP response envelope.
Unable to load BSF: script services not available without BSF: com.ibm.bsf.BSFManager BSF is not properly installed and available to the server. As a result, the service you are talking to (which was presumably implemented using a scripting language) is not available. The <SOAP:Fault> element may contain more detailed information.
BSF Error: unable to load language: ... The service you are talking to is implemented by a scripting language that BSF was unable to load. Verify that BSF is properly set up and that the needed jar/zip files for the scripting language you are using are on the server's classpath as appropriate. The <SOAP:Fault> element may contain more detailed information.
Method 'XYZ' is not supported. The service does not support the invoked method. If your service implementation class has the method, then it may be that your deployment descriptor doesn't publish that method. Check your deployment descriptor. The <SOAP:Fault> element may contain more detailed information.
Exception from service object: ... The service implementation object threw an exception while processing the service request. The <SOAP:Fault> element may contain more detailed information.
Exception while handling service request: ... Some exception occurred while invoking the service implementation object. The <SOAP:Fault> element may contain more detailed information.
Deployment error in SOAP service 'XYZ': ... The indicated error (could not be resolved, could not be resolved as a serializer or could not be resolved as a deserializer) is present in the deployment of the service. Basically, the service is not properly deployed. If you didn't deploy the service, inform the service provider of the problem. If its your service, then check that all classes referred to from the deployment descriptor are available to the server runtime to load. In addition, whatever classes listed as serializers / deserializers in the deployment descriptor must in fact implement the appropriate interfaces to be legitimate.
No Deserializer found to deserialize a 'XYZ' using encoding style 'FOO' The Apache SOAP code received a SOAP envelope (as a request if its on the server side or in a response if its on the client) containing an XML element of schema type XYZ and encoded using encoding style FOO. The exception occurred because the runtime was unable to find a deserializer to deserialize such types encoded in that style. The solution is to add another type mapping to the deployment descriptor (if the problem occurred on the server side) or add another mapping to the client code (if the problem occurred on the client side).
No Serializer found to serialize a 'XYZ' using encoding style 'FOO' While trying to generate a SOAP envelope (as a request if on the client side or in a response if its on the server), Apache SOAP was asked to generate the XML representation of the XYZ Java type using the encoding style FOO. The exception occurred because the runtime was unable to find a serializer to serialize such types in the requested style. The solution is to add another type mapping to the deployment descriptor (if the problem occurred on the server side) or add another mapping to the client code (if the problem occurred on the client side).
Class samples.addressbook.XMLParserLiaison not found. Apache SOAP v2.1 replaced the old XMLParserLiaison infrastructure with JAXP. The migration section in the user's guide tells you how to proceed.

Is it in the FAQ?

If you are down here then you're probably still looking. We feel for you. Let's go to the next level: is your problem listed in one of the FAQs? Please look at http://xml.apache.org/soap/faq.

Have others had this problem?

Oh oh, life's not good today. OK, last resort- please join the soap-user@xml.apache.org mailing list and ask there. Odds are that your problem has been run into before and someone there will know what to do.

Is it a bug?

If you believe that you have found a bug in the code, please visit http://xml.apache.org/soap and file a bug report using Bugzilla. Before filing a report please, please search and see whether it has already been reported by someone else.

Thanks for your patience. Please accept our deepest sympathies for the pain you are in. We feel your pain.