Having a response to my request loooking like this:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns3:hentDokumentForventningerResponse xmlns:ns2="http://nav.no/tjeneste/virksomhet/henvendelse/v1/informasjon" xmlns:ns3="http://nav.no/tjeneste/virksomhet/henvendelsesbehandling/v1">
<dokumentForventning>
<id>525</id>
<kodeverkId>kodeForDagpenger</kodeverkId>
<innsendingsValg>IKKE_VALGT</innsendingsValg>
<hovedskjema>true</hovedskjema>
</dokumentForventning>
<dokumentForventning>
<id>526</id>
<kodeverkId>kodeForEgetVedlegg</kodeverkId>
<innsendingsValg>IKKE_VALGT</innsendingsValg>
<hovedskjema>false</hovedskjema>
<friTekst>Oppsigelse</friTekst>
</dokumentForventning>
<dokumentForventning>
<id>524</id>
<kodeverkId>kodeForPermitteringsvarsel</kodeverkId>
<innsendingsValg>IKKE_VALGT</innsendingsValg>
<hovedskjema>false</hovedskjema>
</dokumentForventning>
</ns3:hentDokumentForventningerResponse>
I want to save all the 3 id-values (525, 526, 524) in LoadRunner.
How do I do that?
In SoapUI I would typically write:
Using "Ord=All" and referencing these values with _1, _2, _3 in my next request works fine. Solved this myself!
Related
I'm triyng to update an order status & tranking number on prestashop 1.7.6.0 via webservice but if the new order status has to send email to customer I get error 500.
Cases:
new order status id 5 send email > error 500 (status changed, no mail sent, other changes like track nr ignored)
new order status id 4 doesn't send email > code 200 (all ok)
BUT if I try changing manually in back office to order status id 5 all is working, status changed and mail sent.
I do all my test on Postman as these information will be changed with a call from an external service for the management of shipment, how can I debug this problem?
End Point: www.domain.ext/api/orders/10705
xml sent
<?xml version="1.0" encoding="UTF-8"?>
<prestashop xmlns:xlink="http://www.w3.org/1999/xlink">
<order>
<id>10705</id>
<id_address_delivery xlink:href="https://www.domain.ext/api/addresses/11307">11307</id_address_delivery>
<id_address_invoice xlink:href="https://www.domain.ext/api/addresses/11307">11307</id_address_invoice>
<id_cart xlink:href="https://www.domain.ext/api/carts/11918">11918</id_cart>
<id_currency xlink:href="https://www.domain.ext/api/currencies/2">2</id_currency>
<id_lang xlink:href="https://www.domain.ext/api/languages/2">2</id_lang>
<id_customer xlink:href="https://www.domain.ext/api/customers/10806">10806</id_customer>
<id_carrier xlink:href="https://www.domain.ext/api/carriers/5">5</id_carrier>
<current_state xlink:href="https://www.domain.ext/api/order_states/5">5</current_state>
<module>codwfeeplus</module>
<invoice_number>0</invoice_number>
<invoice_date>2022-05-10 15:32:41</invoice_date>
<delivery_number>9050</delivery_number>
<delivery_date>2022-05-17 15:16:33</delivery_date>
<valid>1</valid>
<date_add>2022-05-10 15:32:40</date_add>
<date_upd>2022-05-17 15:23:53</date_upd>
<shipping_number notFilterable="true">1592222222</shipping_number>
<id_shop_group>1</id_shop_group>
<id_shop>1</id_shop>
<secure_key>044248612d0019be079f165138d46e85</secure_key>
<payment>CONTRASSEGNO</payment>
<recyclable>0</recyclable>
<gift>0</gift>
<gift_message/>
<mobile_theme>0</mobile_theme>
<total_discounts>0.000000</total_discounts>
<total_discounts_tax_incl>0.000000</total_discounts_tax_incl>
<total_discounts_tax_excl>0.000000</total_discounts_tax_excl>
<total_paid>15.500000</total_paid>
<total_paid_tax_incl>15.500000</total_paid_tax_incl>
<total_paid_tax_excl>15.500000</total_paid_tax_excl>
<total_paid_real>15.500000</total_paid_real>
<total_products>9.500000</total_products>
<total_products_wt>9.500000</total_products_wt>
<total_shipping>6.000000</total_shipping>
<total_shipping_tax_incl>6.000000</total_shipping_tax_incl>
<total_shipping_tax_excl>6.000000</total_shipping_tax_excl>
<carrier_tax_rate>0.000</carrier_tax_rate>
<total_wrapping>0.000000</total_wrapping>
<total_wrapping_tax_incl>0.000000</total_wrapping_tax_incl>
<total_wrapping_tax_excl>0.000000</total_wrapping_tax_excl>
<round_mode>2</round_mode>
<round_type>1</round_type>
<conversion_rate>1.000000</conversion_rate>
<reference>10705</reference>
<associations>
<order_rows nodeType="order_row" virtualEntity="true">
<order_row>
<id>10913</id>
<product_id xlink:href="https://www.domain.ext/api/products/203975">203975</product_id>
<product_attribute_id>0</product_attribute_id>
<product_quantity>1</product_quantity>
<product_name>xxxxxxxxxxxxxxxxxxxx</product_name>
<product_reference>12859</product_reference>
<product_ean13/>
<product_isbn/>
<product_upc/>
<product_price>10.000000</product_price>
<id_customization xlink:href="https://www.domain.ext/api/customizations/0">0</id_customization>
<unit_price_tax_incl>9.500000</unit_price_tax_incl>
<unit_price_tax_excl>9.500000</unit_price_tax_excl>
</order_row>
</order_rows>
</associations>
</order>
</prestashop>
I found it's a Prestashop 1.7.6 WS bug
https://github.com/PrestaShop/PrestaShop/issues/14842
Solved here https://github.com/PrestaShop/PrestaShop/pull/14899
I'm trying to find a way to use the JTApi to get missed and completed calls from the phone. I know that I could write this code myself and capture them in the callobserver, but I specifically want it to come from the PBX/Phone.
Is this possible?
Cisco JTAPI does not provide access to historical call records, nor is their a programmatic way to query the phone device directly. For 'real-time' call history, you would need to implement full-time call observation and record the call meta-data into your own database.
Historical call records are available via CUCM's 'Call Detail Records' function: https://developer.cisco.com/site/sxml/discover/overview/cdr/
These CDRs are sent from supporting phones to CUCM at the end of every call, and are collected/stored on the CUCM Publisher every 1 minute (by default) as CSV formatted flat files.
There are two main mechanisms for accessing CDRs:
FTP/SSH-FTP delivery: up to three destinations can be configured in the CUCM Serviceability admin pages, where CDR files will be delivered per the configured interval:
CDRonDemand SOAP API: available CDR filenames for a time period (up to one hour) can be listed, and individual files requested for FTP/SSH-FTP delivery to a specified location (i.e. the application host). The service/WSDL is available on the CUCM Publisher at: https://:8443/realtimeservice2/services/CDRonDemandService?wsdl
Example of get_file_list request:
<!--CDRonDemand API - get_file_list - Request (datetime format is in UTC time)-->
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="http://schemas.cisco.com/ast/soap/">
<soapenv:Header/>
<soapenv:Body>
<soap:get_file_list>
<soap:in0>201409121600</soap:in0>
<soap:in1>201409121700</soap:in1>
<soap:in2>true</soap:in2>
</soap:get_file_list>
</soapenv:Body>
</soapenv:Envelope>
Example of get_file request:
<!--CDRonDemand API - get_file - Request-->
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:CDRonDemand">
<soapenv:Header/>
<soapenv:Body>
<urn:get_file soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<in0>sftp-server.server.com</in0>
<in1>user</in1>
<in2>password</in2>
<in3>/tmp</in3>
<in4>cdr_StandAloneCluster_01_201409121628_189</in4>
<in5>true</in5>
</urn:get_file>
</soapenv:Body>
</soapenv:Envelope>
More details on application access to CDRs can be found here: https://developer.cisco.com/site/sxml/
I have a container (music show) with 19 tracks in it and 1 item for recommendations section for this show. So totaly there are 20 items. But if I am adding this show to playlist, only tracks will be processed and playlsit will contain 19 tracks. Sonos controller is working fine with it, but Test Suite fails with checking total items after adding show to playlist with message
FAIL The seed playlist and newly created playlist should have the same
quantity of items inside. (expected 19 != actual 20)
As the result Test Suite fails with 1 error. Is it O.K. to send test suite report with such fail? Or you will deny new service with such fail?
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="http://www.sonos.com/Services/1.1">
<SOAP-ENV:Body>
<ns1:getMetadataResponse>
<ns1:getMetadataResult>
<ns1:index>0</ns1:index>
<ns1:count>20</ns1:count>
<ns1:total>20</ns1:total>
<ns1:mediaCollection>
<ns1:id>CONTAINER:RECOMMENDATIONS:594</ns1:id>
<ns1:itemType>collection</ns1:itemType>
<ns1:displayType>grid</ns1:displayType>
<ns1:title>Recommendations</ns1:title>
<ns1:canPlay>false</ns1:canPlay>
<ns1:canAddToFavorites>false</ns1:canAddToFavorites>
</ns1:mediaCollection>
<ns1:mediaMetadata>
<ns1:id>TRACK:11422:594</ns1:id>
<ns1:itemType>track</ns1:itemType>
<ns1:displayType>list</ns1:displayType>
<ns1:title>He Ain't Give You None</ns1:title>
<ns1:summary>The Radiators</ns1:summary>
<ns1:mimeType>audio/mp3</ns1:mimeType>
<ns1:trackMetadata>
<ns1:artist>The Radiators</ns1:artist>
<ns1:duration>531</ns1:duration>
<ns1:rating>0</ns1:rating>
<ns1:canPlay>true</ns1:canPlay>
<ns1:canSkip>true</ns1:canSkip>
</ns1:trackMetadata>
</ns1:mediaMetadata>
<ns1:mediaMetadata>
<ns1:id>TRACK:58012:594</ns1:id>
<ns1:itemType>track</ns1:itemType>
<ns1:displayType>list</ns1:displayType>
<ns1:title>Alimony</ns1:title>
<ns1:summary>The Radiators</ns1:summary>
<ns1:mimeType>audio/mp3</ns1:mimeType>
<ns1:trackMetadata>
<ns1:artist>The Radiators</ns1:artist>
<ns1:duration>632</ns1:duration>
<ns1:rating>0</ns1:rating>
<ns1:canPlay>true</ns1:canPlay>
<ns1:canSkip>true</ns1:canSkip>
</ns1:trackMetadata>
</ns1:mediaMetadata>
[MORE ITEMS HERE]
</ns1:getMetadataResult>
</ns1:getMetadataResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
I am taking some liberties in answering your question since it seems to be directed at Sonos, so apologies in advance. It is very unlikely that your service will be rejected for a bug that happens to be inside Sonos test suite.
So my two cents, go for it and submit your service.
I believe that the issue here is that a playlist is defined as container specifically full of track elements (http://musicpartners.sonos.com/node/286) and your playlist contains a collection. This is why this is failing to generate the correct count in the test.
i´m playing arround with the HIGHRISE API, and they understood the meaning of rest, its pretty cool and at some points gracefully forgivingly, but
has anybody any idea why the xml i PUT is not accepted ?
here is some relevant logging :
2014-02-23 00:00:04] app.INFO: Updating:Person:Highrise-API = people/11834527375.xml [] []
[2014-02-23 00:00:04] app.INFO: request body is :
<?xml version="1.0" encoding="UTF-8"?>
<person>
<first-name><![CDATA[Johnny]]></first-name>
<last-name><![CDATA[B. Good]]></last-name>
<visible-to><![CDATA[Everyone]]></visible-to>
<subject_datas type="array">
<subject_data>
<subject_field_id type="integer"><![CDATA[43212]]></subject_field_id>
<value><![CDATA[dsa328394OOKD323H]]></value>
</subject_data>
<subject_data>
<subject_field_id type="integer"><![CDATA[470259]]></subject_field_id>
<value><![CDATA[provider://w184071823/fmdks/2032]]></value>
</subject_data>
<subject_data>
<subject_field_id type="integer"><![CDATA[469130]]></subject_field_id>
<value><![CDATA[CORE]]></value>
</subject_data>
<subject_data>
<subject_field_id type="integer"><![CDATA[469132]]></subject_field_id>
<value><![CDATA[Way too cool]]></value>
</subject_data>
</subject_datas>
<contact-data>
<phone-numbers>
<phone-number type="array">
<number><![CDATA[081 6418273]]></number>
<location><![CDATA[Work]]></location>
</phone-number>
</phone-numbers>
<addresses type="array">
<address>
<city><![CDATA[New York City]]></city>
<country><![CDATA[US]]></country>
<state><![CDATA[New York]]></state>
<street><![CDATA[Siplingerstreet 11]]></street>
<zip><![CDATA[87527]]></zip>
<location><![CDATA[Work]]></location>
</address>
</addresses>
</contact-data>
</person>
[] []
[2014-02-23 00:00:04] app.INFO: request set [] []
[2014-02-23 00:00:04] app.ERROR: Guzzle/3.8.1 curl/7.28.1 PHP/5.4.10 - [2014-02-22T23:00:04+00:00] "PUT /people/11834527375.xml HTTP/1.1" 422 103 [] []
[2014-02-23 00:00:04] app.INFO: Caught client-error-exception in HighriseService updatePerson(): exception 'Guzzle\Http\Exception\ClientErrorResponseException' with message 'Client error response
[status code] 422
[reason phrase] Unprocessable Entity
i dont see the error :/
I´m very sure the subject_field_id´s are correct and those custom fields are set
Posting e.g saving that xml works, i saw from the response that are fields were set,
only thing i can guess is, that i´m trying to PUT a version where nothing has changed,
is that the problem ?
because my code only checks if that person exists at all and if so update it instead of creating
You should get back some XML in the body of the response. It should look like this:
<?xml version="1.0" encoding="UTF-8"?>
<errors>
<error>Phone number '555-555-5555' has already been taken</error>
</errors>
If you include the id for the existing phone number in your PUT request, then we know that you want to update the existing address, rather than adding a new one: https://github.com/basecamp/highrise-api/blob/master/sections/people.md#update-person
Contact data and Subject data that include an id will be updated, data that doesn’t will be assumed to be new and created from scratch. To remove a piece of data, prefix its id with a minus sign (e.g. -1).
My connection to QB online is working fine. It also works for add customers to QB online.
When i am passing checks through it gives Bad request error.
below is my qbxml.
string post = #"<?xml version=""1.0"" encoding=""utf-8"" ?>
<?qbxml version=""10.0""?>
<QBXML>
<SignonMsgsRq>
<SignonDesktopRq>
<ClientDateTime>%%CLIENT_DATE_TIME%%</ClientDateTime>
<ApplicationLogin>%%AppLogin%%</ApplicationLogin>
<ConnectionTicket>%%ConnTicket%%</ConnectionTicket>
<Language>English</Language>
<AppID>%%AppID%%</AppID>
<AppVer>1</AppVer>
</SignonDesktopRq>
</SignonMsgsRq>
<QBXMLMsgsRq onError=""continueOnError"">
<CheckAddRq>
<CheckAdd>
<AccountRef>
<ListID>1</ListID>
<FullName>Chase Checking</FullName>
</AccountRef>
<PayeeEntityRef>
<ListID>IDTYPE</ListID>
<FullName>Test Vendor</FullName>
</PayeeEntityRef>
<RefNumber>11</RefNumber>
<TxnDate>05/06/2012</TxnDate>
<Memo>My first Memo</Memo>
<Address>
<Addr1>Ahmedabad</Addr1>
<Addr2>Ahmedabad</Addr2>
<Addr3>Ahmedabad</Addr3>
<Addr4>Ahmedabad</Addr4>
<Addr5>Ahmedabad</Addr5>
<City>Ahmedabad</City>
<State>Gujarat</State>
<PostalCode>360015</PostalCode>
<Country>India</Country>
<Note>Note</Note>
</Address>
<IsToBePrinted>N</IsToBePrinted>
<ExchangeRate></ExchangeRate>
<ExternalGUID></ExternalGUID>
<ApplyCheckToTxnAdd>
<TxnID>9054</TxnID>
<Amount>1000</Amount>
</ApplyCheckToTxnAdd>
<ExpenseLineAdd>
<AccountRef>
<ListID></ListID>
<FullName>PublisherPayment</FullName>
</AccountRef>
<Amount>100</Amount>
<Memo>Memo</Memo>
</ExpenseLineAdd>
</CheckAdd>
<IncludeRetElement>STRTYPE</IncludeRetElement>
</CheckAddRq>
</QBXMLMsgsRq>
</QBXML>";
Can anybody guide, please ?
As the qbxml version needs to be 6.0 (even though the IDN Unified On-Screen Reference shows 7.0)
I needed to include the onError="continueOnError" attribute.
Setting the WebRequestObject.ContentLength property is required.
Content Type needs to be "application/x-qbxml"
And finally I received many "The remote server returned an error: (400) Bad Request." exceptions which were not helpful at all but in the end I was able to trace them to something wrong with the xml. So if you get this exception look to your xml as the source of the problem.
So, finally i changed my xml as below.
string post = #"<?xml version=""1.0"" encoding=""UTF-8""?>
<?qbxml version=""6.0""?>
<QBXML>
<SignonMsgsRq>
<SignonDesktopRq>
<ClientDateTime>%%CLIENT_DATE_TIME%%</ClientDateTime>
<ApplicationLogin>%%AppLogin%%</ApplicationLogin>
<ConnectionTicket>%%ConnTicket%%</ConnectionTicket>
<Language>English</Language>
<AppID>%%AppID%%</AppID>
<AppVer>1</AppVer>
</SignonDesktopRq>
</SignonMsgsRq>
<QBXMLMsgsRq onError=""stopOnError"">
<CheckAddRq requestID=""1"">
<CheckAdd>
<AccountRef>
<FullName>Checking</FullName>
</AccountRef>
<PayeeEntityRef>
<FullName>Departures Magazine</FullName>
</PayeeEntityRef>
<RefNumber>9999</RefNumber>
<TxnDate>2012-06-06</TxnDate>
<Memo>Injury Claims Payment</Memo>
<Address>
<Addr1>Eli Manning</Addr1>
<Addr2>1234 S. Giant St</Addr2>
<City>New York</City>
<State>NY</State>
<PostalCode>40961</PostalCode>
</Address>
<IsToBePrinted>false</IsToBePrinted>
<ExpenseLineAdd>
<AccountRef>
<FullName>Publisher Payment</FullName>
</AccountRef>
<Amount>200.00</Amount>
</ExpenseLineAdd>
</CheckAdd>
</CheckAddRq>
</QBXMLMsgsRq>
</QBXML>";