NoMeasureSelected CampaignPerformanceReportRequest Microsoft Ads - ruby

I'm trying to setup Microsoft ads to a project and get CampaignPerformanceReportRequest working on my project but I'm receiving NoMeasureSelected error. Not sure where the issue is.
I added all the columns mention in the documentation to see if the work, but still getting same error. I tested using add dashboard report. It only require Impression and TimePeriod to generate successful report. I make my request to match the request in dashboard, but still get the same error.
Project is based on Ruby on rails.
<env:Body>
<v13:SubmitGenerateReportRequest xmlns="https://bingads.microsoft.com/Reporting/v13">
<v13:ReportRequest xsi:type="CampaignPerformanceReportRequest">
<v13:ExcludeColumnHeaders>true</v13:ExcludeColumnHeaders>
<v13:ExcludeReportFooter>true</v13:ExcludeReportFooter>
<v13:ExcludeReportHeader>true</v13:ExcludeReportHeader>
<v13:Format>Csv</v13:Format>
<v13:ReportName>Test Report</v13:ReportName>
<v13:ReturnOnlyCompleteData>false</v13:ReturnOnlyCompleteData>
<v13:Aggregation>Summary</v13:Aggregation>
<v13:Columns>
<v13:CampaignPerformanceReportColumn>AccountId</v13:CampaignPerformanceReportColumn>
</v13:Columns>
<v13:Columns>
<v13:CampaignPerformanceReportColumn>CampaignId</v13:CampaignPerformanceReportColumn>
</v13:Columns>
<v13:Columns>
<v13:CampaignPerformanceReportColumn>Keyword</v13:CampaignPerformanceReportColumn>
</v13:Columns>
<v13:Columns>
<v13:CampaignPerformanceReportColumn>KeywordId</v13:CampaignPerformanceReportColumn>
</v13:Columns>
<v13:Columns>
<v13:CampaignPerformanceReportColumn>DeviceType</v13:CampaignPerformanceReportColumn>
</v13:Columns>
<v13:Columns>
<v13:CampaignPerformanceReportColumn>Clicks</v13:CampaignPerformanceReportColumn>
</v13:Columns>
<v13:Filter xsi:nil="true"/>
<v13:Scope>
<v13:AccountIds xmlns:a1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<a1:long>[REDACTED]</a1:long>
</v13:AccountIds>
</v13:Scope>
<v13:Time>
<v13:CustomDateRangeEnd>
<v13:Day>30</v13:Day>
<v13:Month>04</v13:Month>
<v13:Year>2022</v13:Year>
</v13:CustomDateRangeEnd>
<v13:CustomDateRangeStart>
<v13:Day>01</v13:Day>
<v13:Month>04</v13:Month>
<v13:Year>2022</v13:Year>
</v13:CustomDateRangeStart>
</v13:Time>
</v13:ReportRequest>
</v13:SubmitGenerateReportRequest>
</env:Body>
Response:
<s:Body>
<s:Fault>
<faultcode>s:Server</faultcode>
<faultstring>Invalid client data. Check the SOAP fault details for more information. TrackingId: 96ad1b6d-26e2-4b60-91d0-b6a68add6140.</faultstring>
<detail>
<ApiFaultDetail xmlns="https://bingads.microsoft.com/Reporting/v13" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<TrackingId xmlns="https://adapi.microsoft.com">96ad1b6d-26e2-4b60-91d0-b6a68add6140</TrackingId>
<BatchErrors/>
<OperationErrors>
<OperationError>
<Code>2017</Code>
<Details i:nil="true"/>
<ErrorCode>NoMeasureSelected</ErrorCode>
<Message>The specified report request does not specify measurement columns (at least one is required). Please submit a report request with the required columns for this report type, and optionally additional columns that are to be included in the report.</Message>
</OperationError>
</OperationErrors>
</ApiFaultDetail>
</detail>
</s:Fault>
</s:Body>
Does any one know what is the issue here or any one has working SOAP request ?

Looks like your structure around Columns isn't quite right.
I think what the error The specified report request does not specify measurement columns (at least one is required). Please submit a report request with the required columns for this report type, and optionally additional columns that are to be included in the report. refers to is that Columns should have multiple values (i.e. be an 'array') - not itself be repeated like in your example.
I infer this from the reference documentation where Columns is defined with type ArrayOfCampaignPerformanceReportColumn.
<xs:element name="Columns" nillable="true" type="tns:ArrayOfCampaignPerformanceReportColumn" />
For your example, something like this should work:
<env:Body>
<v13:SubmitGenerateReportRequest xmlns="https://bingads.microsoft.com/Reporting/v13">
<v13:ReportRequest xsi:type="CampaignPerformanceReportRequest">
<v13:ExcludeColumnHeaders>true</v13:ExcludeColumnHeaders>
<v13:ExcludeReportFooter>true</v13:ExcludeReportFooter>
<v13:ExcludeReportHeader>true</v13:ExcludeReportHeader>
<v13:Format>Csv</v13:Format>
<v13:ReportName>Test Report</v13:ReportName>
<v13:ReturnOnlyCompleteData>false</v13:ReturnOnlyCompleteData>
<v13:Aggregation>Summary</v13:Aggregation>
<v13:Columns>
<v13:CampaignPerformanceReportColumn>AccountId</v13:CampaignPerformanceReportColumn>
<v13:CampaignPerformanceReportColumn>CampaignId</v13:CampaignPerformanceReportColumn>
<v13:CampaignPerformanceReportColumn>Keyword</v13:CampaignPerformanceReportColumn
<v13:CampaignPerformanceReportColumn>KeywordId</v13:CampaignPerformanceReportColumn>
<v13:CampaignPerformanceReportColumn>DeviceType</v13:CampaignPerformanceReportColumn
<v13:CampaignPerformanceReportColumn>Clicks</v13:CampaignPerformanceReportColumn>
</v13:Columns>
<v13:Filter xsi:nil="true"/>
<v13:Scope>
<v13:AccountIds xmlns:a1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<a1:long>[REDACTED]</a1:long>
</v13:AccountIds>
</v13:Scope>
<v13:Time>
<v13:CustomDateRangeEnd>
<v13:Day>30</v13:Day>
<v13:Month>04</v13:Month>
<v13:Year>2022</v13:Year>
</v13:CustomDateRangeEnd>
<v13:CustomDateRangeStart>
<v13:Day>01</v13:Day>
<v13:Month>04</v13:Month>
<v13:Year>2022</v13:Year>
</v13:CustomDateRangeStart>
</v13:Time>
</v13:ReportRequest>
</v13:SubmitGenerateReportRequest>
</env:Body>

Related

Update parameter value in XML format

I have parameters stored in an XML file. Below is a sample of the file.
<?xml version="1.0" encoding="UTF-8"?>
<root>
<terminal id="A">
<terminalCapacity>3</terminalCapacity>
<terminalMembers id="1">
<memberID>0001</memberID>
<memberCapacity>2</memberCapacity>
</terminalMembers>
</terminal>
<terminal id="B">
<terminalCapacity>4</terminalCapacity>
<terminalMembers id="1">
<memberID>0002</memberID>
<memberCapacity>1</memberCapacity>
</terminalMembers>
<terminalMembers id="2">
<memberID>0003</memberID>
<memberCapacity>3</memberCapacity>
</terminalMembers>
</terminal>
</root>
Each terminalID is associated to a type of simpleModule found in my NED file. The idea is to programmatically update these values throughout the simulation run. The current logic revolves around getting the current parameters in XML format and update the memberCapacity field.
From the Omnet cPar and cXMLElement documentation, I tried using the par("moduleParameter").xmlValue()->getXML() function, but this returns the XML as a string. I also tried using the getAttribute() function, but to no success.
Don't do this. par("moduleParameter").xmlValue() will give you the in memory object tree of the XML document, but that is not meant for modification. Your XML file seems to be just a hierarchical structure and modules and their parameters can mirror that exactly. There is absolutely no reason to reinvent the wheel when you can mirror that with INI file parameters.

Questions about xPath structure with SoapUI and Property Transfer - some basics needed

I am now trying another xpath property transfer in SoapUI, and am struggling again.
Rather than specifics I thought I would ask some general questions.
If the response I am wanting to extract from has a line like this:
<ns2:getApprovedPortChangeRequestsResponse xmlns:ns2="http://transferobjects.abc.abc.org">
Oddly, when I click the ns: button in SoapUI it generates the following:
declare namespace soap='http://schemas.xmlsoap.org/soap/envelope/';
declare namespace ns1='http://transferobjects.abc.abc.org';
declare namespace ns2='http://abc.abc.org/api/serviceorder';
But the message response is pretty clear with the ns2 line above
Then I think that I can safely assume that I should do this:
declare namespace ns2='getApprovedPortChangeRequestsResponse';
Now, when I do the part describing what I want to capture, I am using the ns2 tag, following by the section names that follow as I go in to the message, in this case two layers:
//ns2:return/approvedPortChangeRequests/#version
The value I want is the value of the field called version, don't know if I want the # symbol this time, it's a numeric value, but I get null regardless of whether the # is there or not. I have thoroughly checked the response message and pretty certain I have it right. There are a couple of other sections in the response above the field, but they are at the same level as , from what I can see.
I have tried including the getApprovedPortChangeRequestsResponse as a parent layer in the last line, with no effect.
Only when I use getApprovedPortChangeRequestsResponse in the ns2 declaration can I get anything other than Null, and then only verbose errors like this:
[net.sf.saxon.trans.XPathException: XPath syntax error at char 7 on line 2 in {\n//ns2:/return}:
QName cannot end with colon: {ns2:}]
Basically, I am utterly ignorant and my googlefu hasn't shown me any resource where I can build any sort of understanding of what I am doing, so any suggestion on that front would be appreciated. I just need a couple of examples of doing this in SoapUI, and I should be sweet.
Thanks in advance.
EDIT- Full Response here:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns2:getApprovedPortChangeRequestsResponse xmlns:ns2="http://transferobjects.abc.abc.org">
<return>
<success>true</success>
<approvedPortChangeRequests>
<lspOverride>false</lspOverride>
<numbers>
<complete>false</complete>
<gainingCompanyId>11667</gainingCompanyId>
<losingCompanyId>11657</losingCompanyId>
<notRequired>false</notRequired>
<phoneNumber>
<phoneNumber>098453509</phoneNumber>
</phoneNumber>
</numbers>
<DateTimeStart>2018-03-07T08:00:00+13:00</DateTimeStart>
<som>6001309</som>
<category>Simple</category>
<requestDateTime>2018-03-07T12:05:25+13:00</requestDateTime>
<requesterResellerId>21</requesterResellerId>
<responderResellerId>1</responderResellerId>
<responseDue>
<actualDays>0</actualDays>
<actualHours>1</actualHours>
<actualMinutes>47</actualMinutes>
<businessDays>0</businessDays>
<businessHours>1</businessHours>
<businessMinutes>47</businessMinutes>
<negative>false</negative>
</responseDue>
<status>
<status>Awaiting APC Approval</status>
</status>
<version>1</version>
</approvedPortChangeRequests>
</return>
</ns2:getApprovedPortChangeRequestsResponse>
</soap:Body>
</soap:Envelope>
In your payload, version is an element rather than an attribute, so you don't need the #.
soapUI tries to help you out by declaring namespaces, but you can go simpler. If version is all you need and there's only one, you can navigate directly to it regardless of namespaces by using //version. The // notation will select a node no matter where it is in the payload.

ACA IRS status service response with errors

Would it be possible for somebody provide me with example of the ACAGetTransmitterBulkRequestStatus web service response with errors?
I would like to see structure of the attached(if it's in attachment) errors.
Here's an XML with rejection errors:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns3:FormBCTransmitterSubmissionDtl xmlns="urn:us:gov:treasury:irs:ext:aca:air:7.0" xmlns:ns2="urn:us:gov:treasury:irs:common" xmlns:ns3="urn:us:gov:treasury:irs:msg:form1094-1095BCtransmittermessage">
<ACATransmitterSubmissionDetail>
<TransmitterErrorDetailGrp>
<SubmissionLevelStatusCd>Rejected</SubmissionLevelStatusCd>
<UniqueSubmissionId>1095C-16-0000XXXX|1</UniqueSubmissionId>
</TransmitterErrorDetailGrp>
<TransmitterErrorDetailGrp>
<UniqueSubmissionId>1095C-16-0000XXXX|1</UniqueSubmissionId>
<ns2:ErrorMessageDetail>
<ns2:ErrorMessageCd>AIREX126</ns2:ErrorMessageCd>
<ns2:ErrorMessageTxt>Rejected submission - TIN Validation Failed for ALE Member's EIN</ns2:ErrorMessageTxt>
<ns2:XpathContent>EmployerEIN</ns2:XpathContent>
</ns2:ErrorMessageDetail>
</TransmitterErrorDetailGrp>
<TransmitterErrorDetailGrp>
<UniqueRecordId>1095C-16-0000XXXX|1|3</UniqueRecordId>
<ns2:ErrorMessageDetail>
<ns2:ErrorMessageCd>AIRTN500</ns2:ErrorMessageCd>
<ns2:ErrorMessageTxt>TIN Validation Failed</ns2:ErrorMessageTxt>
</ns2:ErrorMessageDetail>
</TransmitterErrorDetailGrp>
</ACATransmitterSubmissionDetail>
</ns3:FormBCTransmitterSubmissionDtl>
You can recreate that same error response by sending invalid EIN's and SSN's that AATS doesn't expect.
If you want to send valid test EIN's, TIN's and names (outside of the IRS AATS test scenarios), please refer to https://www.irs.gov/pub/irs-pdf/p5164.pdf (starting at page 6).
Sample range of valid test EIN's:
EIN RANGE NAME CONTROL
00-0000001 through 00-0000100 HELP
00-0000101 through 00-0000200 HIDE
Sample range of valid test SSN's:
SSN RANGE NAME CONTROL
000-00-0001 through 000-00-0100 HERR
000-00-0101 through 000-00-0200 MART

How to Use Query_Match for Soap UI

I am having trouble using the MockOperation Editor in Soap UI.
I have got this request:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<methodName xmlns="http://tempuri.org/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<dataAreaId>error</dataAreaId>
<pInvoiceList>
<dataAreaId>NOTTHESAME</dataAreaId>
...
</pInvoiceList>
</methodName>
</s:Body>
</s:Envelope>
I tried almost every XPATH expression but I always get "Missing match in request"
What to fill in the Xpath box?
I tried:
//dataAreaId/text()
//dataAreaId/
//dataAreaId
/dataAreaId/text()
/dataAreaId
/methodName/dataAreaId/text()
/methodName/dataAreaId/
/methodName/dataAreaId
I finally managed to get it based on the answer from user1740631
Seems I it had to do with namespaces afterall.
The correct syntax:
declare namespace tem='http://tempuri.org/';
//tem:methodName/tem:dataAreaId[1]
If you don't care about namespaces you can use the following syntax:
XPath1.0
//*[local-name() = 'methodName']/*[local-name() = 'dataAreaId'][1]
XPath2.0
//*:methodName/*:dataAreaId[1]
Write like this
For First One
//methodName[1]/dataAreaId[1]
For Second one
//methodName[1]/pInvoiceList[1]/dataAreaId[1]
*If you have multiple node with same name in Xml then you should use numbers to locate that particular node.
There is a good hint: When defining an Assertion for a Testcase (or maybe also in the Mock-Window) there is a button "Declare" above the XPath-Expression-Field. It doesn't really look like a button, until you point with the mouse-pointer at it, so I didn't realize it at first.
Just click on the button an SoapUI (actually I use 5.2.1) will add the declare-statements for you, that you can use.
I found that feature coincidentally, as it is not really visible. Maybe this can help also...

Why do I get an exception when querying odata service for values that contain null?

I have an OData service running on top of Oracle database. I can query it like this:
http://localhost:4930/Oracle.svc/XXKE_L2E_ADDRESSES_V%28%29?
$filter=PARTY_ID eq 10925&$select=*
and then everything works fine.
For the following also everything works fine (none of the fields contains null value):
http://localhost:4930/Oracle.svc/XXKE_L2E_ADDRESSES_V%28%29?
$filter=PARTY_ID eq 10925&
$select=ADDRESS_ID,PARTY_ID,CITY,ADDRESS1,PARTY_NAME
But the following fails (ADDRESS2 is a field that contains null):
http://localhost:4930/Oracle.svc/XXKE_L2E_ADDRESSES_V%28%29?
$filter=PARTY_ID eq 10925&
$select=ADDRESS_ID,PARTY_ID,CITY,ADDRESS1,PARTY_NAME,ADDRESS2
The response I get is:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<code></code>
<message xml:lang="pl-PL">An error occurred while processing this request.</message>
<innererror>
<message>Value cannot be null.
Parameter name: value</message>
<type>System.ArgumentNullException</type>
<stacktrace> at System.Data.Services.WebUtil.CheckArgumentNull[T](T value, String parameterName)
at System.Data.Services.Internal.ProjectedWrapper.set_PropertyNameList(String value)
at lambda_method(Closure , Shaper )
at System.Data.Common.Internal.Materialization.Coordinator`1.ReadNextElement(Shaper shaper)
at System.Data.Common.Internal.Materialization.Shaper`1.SimpleEnumerator.MoveNext()
at System.Data.Services.Internal.ProjectedWrapper.EnumeratorWrapper.MoveNext()
at System.Data.Services.DataService`1.SerializeResponseBody(RequestDescription description, IDataService dataService)
at System.Data.Services.DataService`1.HandleNonBatchRequest(RequestDescription description)
at System.Data.Services.DataService`1.HandleRequest()</stacktrace>
</innererror>
</error>
Why do I get an error? What's the problem with a null? I get it without problems when i specify $select=*. How to overcome this problem?
EDIT:
I figured out that I am facing exactly the same problem as described here: https://forums.oracle.com/forums/thread.jspa?threadID=2362250. I removed the fields, so there are only 8 and then I can select all of them. If I have 9 fields I can only select 6 of them at a time. If I have 10 fields I can only select 3 of them at a time.
If someone has a solution, I will appreciate it.
The message from Oracle guy:
"MS has identified a couple of potential fixes they could make to resolve this issue. Oracle has provided its feedback. We're waiting to hear whether MS agrees and which release or patch they plan on including the fix with."
So there is no solution for it yet, but the workaround that I use is just selecting all the fields ('*') and then picking the ones that I am interested in from code. At least it works :)

Resources