You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by Shakeel Muhammad <mr...@elm.mt.att.com> on 2004/05/12 17:33:56 UTC

Exception from service object: null

Hi,
 
My client program runs as cron job and it works fine. But sometimes I
get following error:
Fault Code = SOAP-ENV:Server  Fault String = Exception from service
object: null
 
and since the client retries for 2 more times in case of error, I get
following error for subsequent 2 times:
Fault Code = SOAP-ENV:Server.BadTargetObjectURI  Fault String = Unable
to determine object id from call: is the method element namespaced?
 
Any help will be greatly appreciated.
 
Thanks & Regards
-Shakeel
 
Here is my client code:
 
SOAPMappingRegistry soapMappingRegistry = new SOAPMappingRegistry();
BeanSerializer beanSer = new BeanSerializer();
URL soapURL = "http://private/webservice";
// map DataClass
soapMappingRegistry.mapTypes(Constants.NS_URI_SOAP_ENC, new
QName("urn:ServiceInterface", "DataClass"),
                        DataClass.class, beanSer, beanSer);
 
// Build the call.
Call call = buildCall (props, soapMappingRegistry) ;
 
for (int i = 0; i < 3 ; i++) // To Try For 3 times for un-successful
invokation
{
            log.debug ("\n***  Try # " + (i+1)  + "  **** ");
            try {
                        //params.clear ();
                        Vector params = new Vector();
                        params.addElement(new Parameter("DataArray",
DataClass[].class,
 
dataClassArray, null));
 
                        call.setParams(params);
                        // Invoke the call.
                        Response resp;
                        resp = call.invoke(soapURL, "");
                        // Check the response.
                        if (!resp.generatedFault())
                        {
                                    Parameter param =
resp.getReturnValue();
                                    if (param != null)
                                    {
                                                int methodResponse =
((Integer) param.getValue()).intValue();
                                                // Update Database
                                                if (methodResponse == 0)
                                                {
                                                            updateData
(anID, "Y"); // successful
                                                            break; // No
need to run another iteration for successful invokation
                                                }
                                                else
                                                {   Thread.sleep
(10000);  }
                                    }
                                    else
                                    {           Thread.sleep (10000); }
                        }
                        else
                        {
                                    Fault fault = resp.getFault();
                                    log.error("delivery failed: " +
"Fault Code = " + fault.getFaultCode() +
 
"  Fault String = " + fault.getFaultString()  );
                                    Thread.sleep (10000);
                        }
            }
            catch (Exception e)
            {           e.printStackTrace();       }
}