Skip to main content

faultCode argument for createFault was passed NULL

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
1 reply [Last post]
gennaroborriello
Offline
Joined: 2011-02-09

First of all, excuse me for my poor English.

I need to invoke XMLA commands on an Analysis Services cube, (SQL Server
2005 SP4), for example to process it or to change a dimension attribute.
To do this, i build a SOAP request as shown below:

private void test() throws SOAPException, IOException {
String endpointUrl = "http://localhost:8081/olap/msmdpump.dll";
QName serviceName = new QName("service", "XmlaService");
QName portName = new QName("port", "XmlaPort");

/** Create a service and add the port to it. **/
Service service = Service.create(serviceName);
service.addPort(portName, SOAPBinding.SOAP11HTTP_BINDING, endpointUrl);

/** Create a Dispatch instance from a service.**/
Dispatch dispatch =
service.createDispatch(portName, Source.class, Service.Mode.PAYLOAD);
dispatch.getRequestContext().put(
BindingProvider.SOAPACTION_USE_PROPERTY, new Boolean(true)
);
dispatch.getRequestContext().put(
BindingProvider.SOAPACTION_URI_PROPERTY,
"urn:schemas-microsoft-com:xml-analysis:Execute"
);
Source req =
new StreamSource(new
FileInputStream("C:\\ProcessCommandMessage.msg"));

Source response = dispatch.invoke(req);

MessageFactory msgFactory = MessageFactory.newInstance();
SOAPMessage responseMsg = msgFactory.createMessage();
SOAPPart env = responseMsg.getSOAPPart();
env.setContent(response);

if (responseMsg.getSOAPBody().hasFault()) {
SOAPFault fault = responseMsg.getSOAPBody().getFault();
System.out.println(
"Error while processing: " +
fault.getFaultString() + "; " +
fault.getDetail().getValue()
);
}
}

The file "ProcessCommandMessage.msg" contains an XMLA command to execute
cube processing:

Tagetik Analysis Services Project Gennaro
xxx

ProcessFull
UseExisting

If there are no errors, all works fine, but if there is an error, for
example if database name is wrong, then i receive this error:

Exception in thread "main" javax.xml.ws.WebServiceException:
java.lang.IllegalArgumentException: faultCode argument for createFault was
passed NULL
at
com.sun.xml.ws.client.dispatch.DispatchImpl.doInvoke(DispatchImpl.java:199)
at
com.sun.xml.ws.client.dispatch.DispatchImpl.invoke(DispatchImpl.java:206)
at test.gb.AlterCubeClientDispatch.test(AlterCubeClientDispatch.java:180)
at test.gb.AlterCubeClientDispatch.main(AlterCubeClientDispatch.java:75)
Caused by: java.lang.IllegalArgumentException: faultCode argument for
createFault was passed NULL
at
com.sun.xml.messaging.saaj.soap.ver1_1.SOAPFactory1_1Impl.createFault(SOAPFactory1_1Impl.java:66)
at
com.sun.xml.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:180)
at
com.sun.xml.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:122)
at
com.sun.xml.ws.client.dispatch.DispatchImpl.doInvoke(DispatchImpl.java:187)
... 3 more

I sniffed the traffic between the client and the server and found that, for
the example above, the request is:

<?xml version='1.0' encoding='utf-8'?>

Tagetik Analysis Services Project Gennaro
xxx

ProcessFull
UseExisting

while the response, in case of error, is:

XMLAnalysisError.0xc1140004
Errors in the metadata manager. Either the database with
the ID of 'Tagetik Analysis Services Project Gennaro xxx' does not exist in
the server with the ID of 'MSDEV-DBAS', or the user does not have
permissions to access the object.

It seems that the message sent by Analysis Services, (SQL Server 2005 SP4)
is not compliant with SOAP 1.1: it's true?
Can someone help me please?
Thanks to all.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
gennaroborriello
Offline
Joined: 2011-02-09

Hi Jitu thanks for your reply.

Unfortunately, the incorrect response is generated by Analysis Services as a
result of my request. Is it possible that the format of my request is
wrong?

Thanks again,
Gennaro