Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

creating excel datasource using Java in Parasoft Maven Jumpstart project

When mapping the datasource path to the setId method in FileLocation class.
FileLocation location=new FileLocation();
location.setId("${project_loc:PBAPO}/Sample2.xls");

It throws below error :smile:
ErrorResponse [status=404, message=Invalid payload: Specified value '${project_loc:PBAPO}/Sample2.xls' for property [location.id] could not be found, please fix the [location.id]., moreInfoUrl=http://localhost:9080/soavirt/api]

In FileLocation class it does not allow set external method.

public class FileLocation {

protected String id;
protected String external;

/**
 * Gets the value of the id property.
 * 
 * @return
 *     possible object is
 *     {@link String }
 *     
 */
public String getId() {
    return id;
}

Comments

  • williammccusker
    williammccusker Posts: 540 ✭✭✭

    Hi, does the project and file identified by that location id exist on the server? Could you provide a sample JSON payload of what you are trying to send? If you navigate in a browser to "http://localhost:9080/soavirt/api" you will find a page that will let you test sending messages to the api resources.

  • benken_parasoft
    benken_parasoft Posts: 1,030 ✭✭✭

    The "jump start Maven project" is outdated and might be removed later. Instead, there is a new java client available. Please see my response here: Read .tst file using java.

  • This got resolved:
    location.setId('/Projfoldername/DatasourceFileName');

    For ex: if the folder is in C:\SoaTestPoc\Test123ParasoftFolder
    Actual value to be set is the relative path:
    location.setId(Test123ParasoftFolder/Sample2.xls')