Just trying to spot what is invalid with my basket XML.. anyone got any ideas?
This gets a response of "3021:The Basket format is invalid"
<basket>
<item>
<description>A Product</description>
<productSKU>2</productSKU>
<quantity>2</quantity>
<unitNetAmount>49.00</unitNetAmount>
<unitTaxAmount>9.80</unitTaxAmount>
<unitGrossAmount>58.80</unitGrossAmount>
<totalGrossAmount>117.60</totalGrossAmount>
</item>
</basket>
Just tried this with my Server integration. Had to change 'productSKU' to 'productSku' to get it working.
Looks like this an error in the documentation.
Related
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>
We have a SagePay 'Form' integration on a website and we attempt (fail) to get the 'SecurityKey' value using 'SharedAPI' command 'getTransactionDetail'.
In the SagePay docs for 'SharedAPI' it shows how to create a 'getTransactionDetail' request, and the expected response has many properties and values returned in xml format; including a value for 'securitykey'.
But in our response we just get 'version' and 'timestamp' and nothing else.
*[sad-developer-emoji]
Someone at SagePay spoke about the user profile needs access to 'reporting'; but I cannot see how to set that in SagePay account?
The profile has access to all the settable things it can (EG: terminal; transactions; etc).
Not sure what we are doing wrong.
EG:
*REQUEST
<vspaccess>
<command>getTransactionDetail</command>
<vendor>[VendorName]</vendor>
<user>[UserName]</user>
<vpstxid>[VPSTxID]</vpstxid>
<signature>[MD5HashSignature]</signature>
</vspaccess>
[MD5HashSignature] = CalculateMd5Hash(
<command>getTransactionDetail</command>
<vendor>[VendorName]</vendor>
<user>[UserName]</user>
<vpstxid>[VPSTxID]</vpstxid>
<password>[UserPassword]</password>)
*RESPONSE
<?xml version="1.0" encoding="ISO-8859-1" ?>
<vspaccess>
<version>1.02</version>
<timestamp>18/11/2020 08:14:54</timestamp>
</vspaccess>
It is important to ensure that XML is in capitals when doing the POST, else you get the generic response outlined in the above post.
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.
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
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...