On April 27, 2024, our Sign-in and Create Account options will be unavailable from 9am-12pm ET. During this maintenance window, developer account access and free trial registration will be unavailable.

how to setup queryservice using wsdls generated from axis1.4 on jdk 1.4 env

karthik.b.venkatarama
karthik.b.venkatarama Karthik Venkatarama

Hi,

I trying to use DFS on jdk 1.4, so Iam using WSDLs generated from axis1.4. Iam able to setup security element and use the objectservices but not the query service.

below is the code snippet::

public void GetElementQuery(String repositoryName)

    {
        try{
            String queryString = "select * from dm_document where object_name like 'doc%'";
            QueryServiceLocator querySvcLocator=new QueryServiceLocator();    
            QueryServicePortBindingStub queryStub= (QueryServicePortBindingStub)querySvcLocator.getQueryServicePort();                    
            queryStub.setHeader(new SOAPHeaderElement(ele));
            String[] docbase = new String[1];
            docbase[0] = repositoryName;
            PassthroughQuery query = new PassthroughQuery();
            query.setQueryString(queryString);
            query.setRepositories(docbase);
            QueryExecution queryEx = new QueryExecution();
            queryEx.setCacheStrategyType(CacheStrategyType.DEFAULT_CACHE_STRATEGY);
            OperationOptions operationOptions = null;
            QueryResult queryResult = queryStub.execute(query, queryEx, operationOptions);
            DataPackage resultDp = queryResult.getDataPackage();         
            DataObject[] dataObjects = resultDp.getDataObjects();
            System.out.println("no. of returned objects :: "+dataObjects.length);
            }catch (Exception e){
                e.printStackTrace();
            }
    }

##################

The dataobject value returns null even though the query is proper. Can anyone tell me whts wrong with the code.