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(); } } |
- Exception from service object: null Sandro Pedrocchi
- Re: Exception from service object: null Scott Nichol
- Shakeel Muhammad