Retrieving PDF report from BO4.1 Webservice - pdf

I am trying to migrate my web service client from BO 3.x to BO 4.1 Restful.
The existing implementation of BO 3.x uses BO java SDK to get CUID and doc properties to get the PDF report by using below inputs.
Report Path : path://InfoObjects/Root Folder/Application Name/Report
Name.rpt
Fill Parameter List : Parameter 1, Parameter 2, Parameter 3 etc to identify a report.
I have constructed my client code to get Logon token from RESTful web service. However I am not sure how to retrieve the PDF file now in BO 4.1.
Many of the samples I have seen uses sIDType and iDocID parameters along with Token value to retrieve the document by constructing a URL like below
http://server:port/BOE/OpenDocument/opendoc/openDocument.jsp?token=[LogonToken]&iDocID=[XXXX]&sIDType=CUID
My question : Is it must to have iDocID to retrieve document using URL pattern above or is it possible to construct a URL using report path / CUID and fill parameters ( without using iDocID) to retrieve pdf report from BO Web service.
Please assist me on this. Thanks

Note the &sIDType=CUID parameter in your sample URL -- that indicates that the page is expecting the value of iDocID to be a CUID. Without sIDType=CUID, it would expect the value to be an integer document ID.
That is, you only need the CUID, not the document ID. Also, CUID is unique, so there would be no value in specifying both CUID and path.
Incidentally, instead of specifying a CUID or ID, you can specify the document's path and name. However, this functionality is deprecated in BI4.1.
Prompt values can be supplied to openDocument using the lsS and lsM parameters (for single-select and multi-select prompts, respectively).
See the openDocument documentation here.

Related

Netsuite Advanced PDF BOM

I am creating a print out for BOM using advanced pdf. I am trying to get get the value of the Start Date from the work order but in the print out, it is empty. I set this using ${record.startdate}. Is this correct? Is there another internal id for start date and end date in the work order?
Thanks!
If the object passed to the pdf generator name is "record" offcourse you can reference is as it is. It depends on the passed parameter name. If you are modifying existing html check the rest of the script and you will see if its 'record' or not.
You can reference with ${record.startDate} and ${record.endDate}
All the available fields for the object can be found here.

Neto API Limitations

I'm currently attempting to integrate with the Neto Ecommerce API. I've hit all sorts of limitations that I never see on other platforms and the latest is to do with custom fields.
The API Im using is the GetOrders API, and Im following the requirements to fetch transaction information, however custom fields appear to be missing. Hoping someone out there has made use of this API to extract custom fields and can advise on how to go about getting custom field information.
Any tips appreciated
var netoString = '{"Filter":{"OrderID":[""],"OutputSelector":["ID","ShippingOption","DeliveryInstruction","RelatedOrderID","cust1"]};
Is there an undocumented naming convention used to fetch custom fields or other pattern I can try to see if I can fetch the data?
I am not certain this will be the same for the API, but when using exports the correct format to access Custom Sales Order Fields is "customer_ref1".
To get a Custom Customer Fields is "usercustom1"
Note: For the Custom Customer Fields, the numbers do not match up correctly (I.E. usercustom1 doesn't match misc1 in the cpanel). The correct matches are:
misc1=usercustom1
misc2=usercustom4
misc3=usercustom5
misc4=usercustom6
misc5=usercustom7
misc6=usercustom11
misc7=usercustom12
misc8=usercustom13
misc9=usercustom14
misc10=usercustom15
misc11=usercustom16
misc12=usercustom17
misc13=usercustom18
misc14=usercustom19
misc15=usercustom20
misc16=usercustom21
misc17=usercustom22
misc18=usercustom23
misc19=usercustom24
misc20=usercustom25
misc21=usercustom10
misc22=usercustom26
misc23=usercustom27
misc24=usercustom28
misc25=usercustom29
misc26=usercustom30
misc27=usercustom31
misc28=usercustom32
misc29=usercustom33
misc30=usercustom34
misc31=usercustom35
misc32=usercustom36
misc33=usercustom37
misc34=usercustom38
misc35=usercustom39
misc36=usercustom40

JMeter: Passing Key Value Pairs Not Working

I'm using JMeters to automate API testing to/from our database using basic CRUD methodology. After the record creation, I'm trying to perform 3 different types of Reads (think CRRRUD). :)
Read 1 - Retrieve by ID
HTTP (GET) the base URL is appended with the saved record ID.
http..../crud/tableName/${newRecordId}
This returns
Read 2 - Retrieve by field type with no defined value
HTTP (POST) the base URL is extended with a "search" as the end. A Key is defined ("name") with no value.
http..../crud/tableName/search
Parameter Name = name
Value = {undefined}
This returns all records within the table whose field ("name") is not null.
Read 3 - Retrieve by field type with a defined value
HTTP (POST) the base URL is extended with a "search" as the end. A Key is defined ("name") with the value generated during the creation request.
http..../crud/tableName/search
Parameter Name = name
Value = Metropolis
This, too, returns ALL of the records within the table instead of just the record(s) whose name = Metropolis.
This 3rd Retrieve works properly when using a REST client, (e.g., Postman, Advanced REST Client, etc.) when defining the Key|Value pair as "name|Metropolis". So it must be something within JMeter that I'm missing.
Any insight is appreciated!
There is only one correct answer: compare what's being sent by REST Client and JMeter using sniffer tool (i.e. Wireshark), detect the differences and configure JMeter accordingly.
Just a guess: given you mentioned "API" an "REST" words maybe you need to pass it as JSON like:
{"name":"Metropolis"}
as a single parameter value
or in formatted way (in case if server checks Content-Length and/or wants the request to be properly formatted)
You may also need to add HTTP Header Manager in order to send Content-Type header with the value of application/json. See Testing SOAP/REST Web Services Using JMeter guide for more details.

How to validate the all parametes by using XSD against validation

How to validate the all mandatory parameters at one time.I want to display all mandatory parameters not entered in user .For Example I have 4 parameters username,pwd,phno,address.
If the user not provided the information of two parameters like pwd and address.
By using the XSD against validation concept,It throwing the SAX Exception on PWD.but it not showing the exception on Adress as well.
Condition:
1.Input format may jsonformat,xml,or any thing.
Please share information.
I have not found concrete information from this site.

How to use Global Property name in my JSON input request using SoapUI?

I have a SoapUI project which contains around 60 plus services. Each service requires some input which will be changed for every execution. So I have created certain Global Properties and assign some values to that properties.
I have to use these properties values in my SoapUI request ( i.e. JSON Format request ).
If it is groovy script means, I will use like this.
String HTiC_Username = com.eviware.soapui.model.propertyexpansion.PropertyExpansionUtils.globalProperties['HTiC_Username'].value;
But, how to get the value of the Global Property in the request?
Hope you understand my question. Please provide proper guidance.
Thanks
To dynamically "expand" (i.e. substitute) the value of a property into a test step, the following syntax is used: ${#scope#propertyName}
...where 'scope' refers to the level at which the property has been defined (e.g. Global, Project, TestSuite, TestCase).
So to expand a property named username defined as a Global property, for example, the following code can be used directly within a Request Test Step (e.g within a JSON body, or header value, etc):
${#Global#username}
To access the same property value within a Groovy Test Step, you can use the following syntax:
context.expand('${#scope#propertyName}')
...as in the following example:
context.expand('${#Global#username}')
What we did was the following:
created a test data file to store all the specific input data for the different services (testdata.properties)
Example content of testdata.properties:
Billing_customerID=1234567
OtherService_paymentid=12121212
....
create a SoupUi global parameter (File/Preferences/Global properties): testdata_filepath=C:\...
For specific services we added a Properties test step. You can specify the "Load from" field to our new global parameter: ${#Global#testdata_filepath} Now you can use the Load button to load parameters.
Finally you can reference the parameter in your xml in the following format: ${Properties#Billing_customerID}
Example content of a service with parameter:
...
<BillingCustomerIdentification>
<BillingCustomerID>${#Properties#Billing_customerID}</BillingCustomerID>
</BillingCustomerIdentification>
...
To set up your projects in this manner also helps to automate service tests eg. using Hudson (see my previous SO answer).
If it is too heavy and automation is not a target, you can simply use ${#Global#someinputvariable} format in your xml ;-)