If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

** How to disable report specification validation? **

Started by vip2cool, 08 Jan 2009 08:27:47 AM

Previous topic - Next topic

vip2cool

Hi all,

i'm trying to add a report specification to the content store, but i want to bypass the auto validation in the following method:

add(parentPath, object, options)

Anyone know how to do this? Thanks

>here is the call to the add method:

connection.getReportService().add(new SearchPathSingleObject(searchPath), newReport, addReportOptions);

>here is the AxisFault that cause by the above line:

AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Client
faultSubcode:
faultString: Client Error
faultActor:
faultNode:
faultDetail:
       {http://developer.cognos.com/schemas/bibus/3/}exception:                                    <ns1:severity xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">Error</ns1:severity>
                                       <ns1:errorCode xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">0</ns1:errorCode>
                                       <ns1:message xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="bus:message">
                                               <ns1:messageString xsi:type="xs:string">RSV-SRV-0003 The report specification contains an error at line ' 3', column ' 80'.</ns1:messageString>
                                               <ns1:nestingLevel xsi:type="xs:integer">0</ns1:nestingLevel>
                                       </ns1:message>
                                       <ns1:message xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="bus:message">
                                               <ns1:messageString xsi:type="xs:string">Unknown element 'report'</ns1:messageString>
                                               <ns1:nestingLevel xsi:type="xs:integer">0</ns1:nestingLevel>
                                       </ns1:message>
                                       <ns1:message xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="bus:message">
                                               <ns1:messageString xsi:type="xs:string">RSV-SRV-0042 Trace back:</ns1:messageString>
                                               <ns1:nestingLevel xsi:type="xs:integer">1</ns1:nestingLevel>
                                       </ns1:message>
                                       <ns1:message xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="bus:message">
                                               <ns1:messageString xsi:type="xs:string">RSReportService.cpp(792): RSException: CCL_CAUGHT: RSReportService::process()</ns1:messageString>
                                               <ns1:nestingLevel xsi:type="xs:integer">1</ns1:nestingLevel>
                                       </ns1:message>
                                       <ns1:message xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="bus:message">
                                               <ns1:messageString xsi:type="xs:string">RSReportServiceMethod.cpp(239): RSException: CCL_RETHROW: RSReportServiceMethod::process(): reportAdd_Request</ns1:messageString>
                                               <ns1:nestingLevel xsi:type="xs:integer">1</ns1:nestingLevel>
                                       </ns1:message>
                                       <ns1:message xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="bus:message">
                                               <ns1:messageString xsi:type="xs:string">RSReportGenerator.cpp(297): RSException: CCL_THROW: RSReportGenerator::syncProperties</ns1:messageString>
                                               <ns1:nestingLevel xsi:type="xs:integer">1</ns1:nestingLevel>
                                       </ns1:message>

>here is the add method from cognosClient.jar (the bold line below is where I think the validation and the add take place):

   public com.cognos.developer.schemas.bibus._3.AuthoredReport add(com.cognos.developer.schemas.bibus._3.SearchPathSingleObject parentPath, com.cognos.developer.schemas.bibus._3.AuthoredReport object, com.cognos.developer.schemas.bibus._3.AddOptions options) throws java.rmi.RemoteException {
       if (super.cachedEndpoint == null) {
           throw new com.cognos.org.apache.axis.NoEndPointException();
       }
       com.cognos.org.apache.axis.client.Call _call = createCall();
       _call.setOperation(_operations[0]);
       _call.setUseSOAPAction(true);
       _call.setSOAPActionURI("http://developer.cognos.com/schemas/reportService/1");
       _call.setSOAPVersion(com.cognos.org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
       _call.setOperationName(new javax.xml.namespace.QName("http://developer.cognos.com/schemas/reportService/1", "add"));

       setRequestExplicitHeaders(_call);
       _call.addHeader( getServiceContext().getImplicitHeader( "http://developer.cognos.com/schemas/bibus/3/", "biBusHeader"));
       setAttachments(_call);
       java.lang.Object _resp = null;
       try {
           _resp = _call.invoke(new java.lang.Object[] {parentPath, object, options});

       } catch ( java.rmi.RemoteException e ) {
           throw (java.rmi.RemoteException)e;
       } finally {
           getServiceContext().updateImplicitHeader( _call, "http://developer.cognos.com/schemas/bibus/3/", "biBusHeader");
           getServiceContext().updateExplicitHeaders(_call);
       }

       if (_resp instanceof java.rmi.RemoteException) {
           throw (java.rmi.RemoteException)_resp;
       }
       else {
           extractAttachments(_call);
           try {
               return (com.cognos.developer.schemas.bibus._3.AuthoredReport) _resp;
           } catch (java.lang.Exception _exception) {
               return (com.cognos.developer.schemas.bibus._3.AuthoredReport) com.cognos.org.apache.axis.utils.JavaUtils.convert(_resp, com.cognos.developer.schemas.bibus._3.AuthoredReport.class);
           }
       }
   }

>Here is the invoke method from axis.jar from the above bold line (here is where I'm currently stuck at):

   public Object invoke(Object params[])
       throws RemoteException
   {
       long t0 = 0L;
       long t1 = 0L;
       if(tlog.isDebugEnabled())
           t0 = System.currentTimeMillis();
       SOAPEnvelope env = null;
       int i;
       for(i = 0; params != null && i < params.length && (params instanceof SOAPBodyElement); i++);
       if(params != null && params.length > 0 && i == params.length)
       {
           isMsg = true;
           env = new SOAPEnvelope(msgContext.getSOAPConstants(), msgContext.getSchemaVersion());
           if(!(params[0] instanceof SOAPEnvelope))
               for(i = 0; i < params.length; i++)
                   env.addBodyElement((SOAPBodyElement)params);

           Message msg = new Message(env);
           setRequestMessage(msg);
           invoke();
           msg = msgContext.getResponseMessage();
           if(msg == null)
           {
               return null;
           } else
           {
               env = msg.getSOAPEnvelope();
               return env.getBodyElements();
           }
       }
       if(operationName == null)
           throw new AxisFault(Messages.getMessage("noOperation00"));
       try
       {
           Object res = invoke(operationName.getNamespaceURI(), operationName.getLocalPart(), params);
           if(tlog.isDebugEnabled())
           {
               t1 = System.currentTimeMillis();
               tlog.debug("axis.Call.invoke: " + (t1 - t0) + " " + operationName);
           }
           return res;
       }
       catch(AxisFault af)
       {
           if(af.detail != null && (af.detail instanceof RemoteException))
               throw (RemoteException)af.detail;
           else
               throw af;
       }
       catch(Exception exp)
       {
           entLog.debug(Messages.getMessage("toAxisFault00"), exp);
           throw new AxisFault(Messages.getMessage("errorInvoking00", "\n" + exp));
       }
   }