Hi
I am trying to add an XML source in a attchment of my response.
After the call, the client app throws this exception after deserialization:
2005/07/20 10:24:35:910 CEST [DEBUG] ConfigurationException -
Exception: <org.apache.axis.ConfigurationException: No service named
fr.ccip.intuition.ws.complexquery.XMLQueryService is available
org.apache.axis.ConfigurationException: No service named
fr.ccip.intuition.ws.complexquery.XMLQueryService is available
at
org.apache.axis.configuration.FileProvider.getService(FileProvider.java:233)
at org.apache.axis.AxisEngine.getService(AxisEngine.java:311)
at
org.apache.axis.MessageContext.setTargetService(MessageContext.java:755)
at org.apache.axis.client.Call.invoke(Call.java:2671)
at org.apache.axis.client.Call.invoke(Call.java:2424)
at org.apache.axis.client.Call.invoke(Call.java:2347)
at org.apache.axis.client.Call.invoke(Call.java:1804)
at
fr.ccip.intuition.ws.complexquery.FrCcipIntuitionWsComplexqueryXMLQueryServiceSoapBindingStub.runQuery(FrCcipIntuitionWsComplexqueryXMLQueryServiceSoapBindingStub.java:112)
at
fr.ccip.intuition.ws.complexquery.XMLQueryServiceServiceTestCase.test1FrCcipIntuitionWsComplexqueryXMLQueryServiceRunQuery(XMLQueryServiceServiceTestCase.java:52)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
and
{http://xml.apache.org/axis/}hostname:DOIABK035
java.lang.reflect.InvocationTargetException
at
org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:221)
at
org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:128)
at
org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1712)
I am using OC4J 10.1.2 with the XML parser on the server I didnt try
with tomcat.
The code :
public Boolean runQuery(String _query, String _dbschema, int _from, int
_to) throws RemoteException {
boolean hasAttachments = false;
trace.info("Starting XML query service [" + _query + ";" +
_dbschema + ";" + _from + "]...");
try {
SOAPMessageContext msgContext =
MessageContext.getCurrentContext();
SOAPMessage message = msgContext.getMessage();
Iterator attachmentsIterator = message.getAttachments();
if (attachmentsIterator == null) {
trace.fatal("No Support for attachments !");
throw new SOAPException("No Support for attachments");
}
// GETS the source of a XML doc
IntuitionHelper helper = new IntuitionHelper();
Source source = helper.runQuerySource(new Query(_query,
_dbschema, _from, _to));
DataHandler handler = new DataHandler(source, "text/xml");
AttachmentPart current = message.createAttachmentPart(handler);
current.setContentId("queryResult");
message.addAttachmentPart(current);
message.saveChanges();
} catch (SOAPException e) {
trace.error(getClass().getName() + ".runQuery():" +
e.getMessage(), e);
throw new RemoteException(e.getMessage(), e);
} catch (IntuitionException e) {
trace.error(getClass().getName() + ".runQuery():" +
e.getMessage(), e);
throw new RemoteException(e.getMessage(), e);
} catch (Exception e) {
trace.error(getClass().getName() + ".runQuery():" +
e.getMessage(), e);
throw new RemoteException(e.getMessage(), e);
} finally {
trace.info("XML Service done!");
}
return new Boolean(hasAttachments);
}
When I comment all the code and return only a boolean, every works fine.
Thanks in advance
Regards,
Alexandre Touret