LogRhythm SOAP Api problems - soap

Anyone here manage to get something from LR soap API ?
My query is quite simple, here is an extract:
<soap:Body>
<GetAlarmHistoryByID
xmlns="http://www.logrhythm.com/webservices"
xmlns:ns2="http://schemas.microsoft.com/2003/10/Serialization/Arrays"
xmlns:ns3="http://schemas.microsoft.com/2003/10/Serialization/">
<alarmID>140</alarmID>
<includeNotifications>false</includeNotifications>
<includeComments>false</includeComments>
</GetAlarmHistoryByID>
</soap:Body>
I receive the following in response, which makes no sense, because of "Include notifcations or include comments is required." but the values are found lower:
includeNotifications: 140 include comments: False (inversed from the values i passed...)
<s:Fault>
<faultcode>s:Client</faultcode>
<faultstring xml:lang="en-US">Include notifcations or include comments is required.</faultstring>
<detail>
<LogRhythmWebServiceFault
xmlns="http://www.logrhythm.com/webservices"
xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<FaultID>4d12a9ed-bff7-4dfb-ad71-29372c12544d</FaultID>
<Details>Error getting Alarm history (includeNotifications: 140 include comments: False) for ID False</Details>
<FaultTime>2017-09-07T17:46:22.5779477Z</FaultTime>
<ErrorID>3024</ErrorID>
</LogRhythmWebServiceFault>
</detail>
</s:Fault>
Method: GetAlarmHistoryByID
Retrieve a list of alarm status and comment updates. The Alarm ID would be derived from one of the GetFirstPageAlarms or a GetNextPageAlarms method call.
alarmID long No The unique ID of the alarm.
includeNotifications boolean No If true, include notification history.
includeComments boolean No If true, include comments history.
Output
The alarm history.

I had a similar problem and it ended up being a bug with the calls on LogRhythm's side. I'd advise to make a ticket with them for a resolution. If you haven't figured it out yet

Related

How can I remove a specific PNR from a Queue in Sabre SOAP API

I use GetReservationRQ to retrieve a named PNR. I would then like to remove this PNR from the queue. I have tried to use QueueAccessRQ
QueueAccessRQ with <Navigation Action=""QR""/>
returns "CANNOT DO THIS IF OFF QUEUE"
QueueAccessRQ with <Navigation Action=""E""/>
returns "NO CHANGES MADE TO PNR - UPDATE OR IGNORE"
QueueAccessRQ with <Navigation Action=""QR""/><Selection Function=""PR"" Criteria=""ABC123""/>
returns "Navigation, Selection are mutually exclusive"
Even if I do IgnoreTransactionRQ or EndTransactionRQ before QueueAccessRQ, the messages are the same, except
IgnoreTransactionRQ followed by QueueAccessRQ with <Navigation Action=""E""/>
returns "UNABLE TO END TRANSACTION - NO PNR PRESENT IN WORK AREA"
How can I remove a specific PNR from a Queue?
You should be able to use QueueAccessLLSRQ along with GetReservationRQ but you do have to use a stateful request (and session tokens).
You'd want to do something like:
SessionCreateRQ
GetReservationRQ
QueueAccessLSSRQ
SessionCloseRQ
Your GetReservation could look something like:
<GetReservationRQ xmlns="http://webservices.sabre.com/pnrbuilder/v1_18" Version="1.18.0">
<Locator>****RECORD LOCATOR HERE****</Locator>
<RequestType>Stateful</RequestType>
<ReturnOptions>
<SubjectAreas>
<SubjectArea>HEADER</SubjectArea>
</SubjectAreas>
<ViewName>Simple</ViewName>
<ResponseFormat>STL</ResponseFormat>
</ReturnOptions>
</GetReservationRQ>
Then QueueAccessLLSRQ:
<QueueAccessRQ xmlns="http://webservices.sabre.com/sabreXML/2011/10" ReturnHostCommand="true" Version="2.0.6">
<Navigation Action="QR" />
<QueueIdentifier PseudoCityCode="****PCC HERE****" Number="****QUEUE NUMBER HERE****" />
</QueueAccessRQ>
Also keep in mind that any other changes made to the PNR between the GetReservationRQ and QueueLLSRQ calls would be end-transacted when removing from queue.
This means you are not working on Queue Mode - QR will not work if not in Queue Mode
QueueAccessRQ with returns "CANNOT DO THIS IF OFF QUEUE"

Getting the error "Number of packages exceeds maximum" from FedEX API

I am getting "FedEx Ship Error: (8522) Number of packages exceeds maximum" error. I am trying to send a multiple-package shipment request to fedEX, but it is getting failed in first package request only.
For sending multiple shipment request to FedEX, we have to send separate request for each package, the master tracking information will be returned in reply from the first package requested. That master tracking information is then inserted into the requests for each additional package requested for that multiple-package shipment.
The example below is first package request.
Below is the XML request Body I am sending to FedEX API "https://wsbeta.fedex.com:443/xml"
The code is just preparing the data structure, converting it into XML and hitting the fedEX API with XML request.
my $http_request = HTTP::Request->new('POST', $config->{'URL'});
$http_request->content_type('application/x-www-form-urlencoded');
$http_request->content(Encode::encode_utf8($xml_request_body));
my $http_response;
eval {
$http_response = $ua->request($http_request);
};
return errorShipResponse($p) if (!defined $http_response || !$http_response->is_success);
my $response;
eval {
$response = XML::Simple::XMLin(
$http_response->content,
ForceArray => 1,
NSExpand => 1
);
};
$xml_request_body
<?xml version="1.0" encoding="UTF-8"?>
<ProcessShipmentRequest xmlns="http://fedex.com/ws/ship/v12">
<WebAuthenticationDetail>
<UserCredential>
<Key>aaaaaaaaaaa</Key>
<Password>aaaaaaaaaaaaaaaa</Password>
</UserCredential>
</WebAuthenticationDetail>
<ClientDetail>
<AccountNumber>111111111</AccountNumber>
<MeterNumber>111111111111</MeterNumber>
</ClientDetail>
<Version>
<ServiceId>ship</ServiceId>
<Major>12</Major>
<Intermediate>0</Intermediate>
<Minor>0</Minor>
</Version>
<RequestedShipment>
<ShipTimestamp>2016-09-06T06:42:41-04:00</ShipTimestamp>
<DropoffType>REGULAR_PICKUP</DropoffType>
<ServiceType>SMART_POST</ServiceType>
<PackagingType>YOUR_PACKAGING</PackagingType>
<TotalWeight>
<Units>LB</Units>
<Value>15.00</Value>
</TotalWeight>
<Shipper>
<AccountNumber>111111111111</AccountNumber>
<Tins>
<TinType>BUSINESS_STATE</TinType>
<Number444444444444</Number>
</Tins>
<Contact>
<CompanyName>aaaaaaaaaaaa</CompanyName>
<PhoneNumber>11111111</PhoneNumber>
</Contact>
<Address>
ADDRESS HERE
</Address>
</Shipper>
<Recipient>
<Contact>
<PersonName>mukta jain</PersonName>
<PhoneNumber>1234567899</PhoneNumber>
</Contact>
<Address>
<StreetLines>lwehcfkwdjh</StreetLines>
<City>NY</City>
<StateOrProvinceCode>NY</StateOrProvinceCode>
<PostalCode>12345</PostalCode>
<CountryCode>US</CountryCode>
<Residential>true</Residential>
</Address>
</Recipient>
<ShippingChargesPayment>
<PaymentType>SENDER</PaymentType>
<Payor>
<ResponsibleParty>
<AccountNumber>444444444</AccountNumber>
<Tins>
<TinType>BUSINESS_STATE</TinType>
<Number>4444444444</Number>
</Tins>
<Contact>
<CompanyName>aaaaaaaaa</CompanyName>
<PhoneNumber>111111111</PhoneNumber>
</Contact>
<Address>
<ADDRESS HERE>
</Address>
</ResponsibleParty>
</Payor>
</ShippingChargesPayment>
<SmartPostDetail>
<Indicia>PARCEL_SELECT</Indicia>
<AncillaryEndorsement>ADDRESS_CORRECTION</AncillaryEndorsement>
<SpecialServices>USPS_DELIVERY_CONFIRMATION</SpecialServices>
<HubId>1234</HubId>
<CustomerManifestId>123456</CustomerManifestId>
</SmartPostDetail>
<LabelSpecification>
<LabelFormatType>COMMON2D</LabelFormatType>
<ImageType>EPL2</ImageType>
<LabelStockType>STOCK_4X6</LabelStockType>
</LabelSpecification>
<RateRequestTypes>LIST</RateRequestTypes>
<PackageCount>3</PackageCount>
<RequestedPackageLineItems>
<SequenceNumber>1</SequenceNumber>
<GroupPackageCount>1</GroupPackageCount>
<Weight>
<Units>LB</Units>
<Value>5</Value>
</Weight>
<Dimensions>
<Length>7</Length>
<Width>7</Width>
<Height>7</Height>
<Units>IN</Units>
</Dimensions>
<CustomerReferences>
<CustomerReferenceType>INVOICE_NUMBER</CustomerReferenceType>
<Value>E2315141</Value>
</CustomerReferences>
<CustomerReferences>
<CustomerReferenceType>CUSTOMER_REFERENCE</CustomerReferenceType>
<Value>E2315141</Value>
</CustomerReferences>
</RequestedPackageLineItems>
</RequestedShipment>
</ProcessShipmentRequest>
You give us almost nothing to work with, so it's hard to be any help at all. But there's one thing that seems strange in your request body. Assuming that you're showing us a dump of a Perl data structure, it seems weird that all of your scalar values are implemented as anonymous arrays. For example, the line defining the package count is:
'PackageCount' => [ 3],
Where I'd expect to see:
'PackageCount' => 3,
It's possible that you have access to some documentation that tells you to do it this way, but it seems strange to me.
It would also explain the error message as the array reference would be interpreted as an integer which would almost certainly be far greater than any number expected by the API!
Update: When I wrote this answer, the question included what looked like a large Perl data structure which exhibited the weirdness that I discuss above. Now that has been changed to an XML document which seems to have the correct values. I have no idea where the original data structure came from or how it was used. And, in the absence of any feedback from the original poster, I have no idea how useful this answer is.

Meeting request properties not settable in EWS SOAP calls?

I (re)create (recurrent) events in Exchange Server talking to Exchange Web Services with pure SOAP calls.
When these events are actually meeting requests I try to maintain some meeting properties that were previously retrieved, so I put them in the CreateItem call:
AllowNewTimeProposal
AppointmentReplyTime
ConferenceType
IsCancelled
IsOnlineMeeting
IsResponseRequested
MeetingWorkspaceURL
MeetingRequestWasSent
MyResponseType
NetShowURL
Organizer
OptionalAttendees
RequiredAttendees
Resources
At first I got the error Set action is invalid for property for the properties IsCancelled and IsOnlineMeeting, and thought O, these are probably set automatically, but now I even get them for the Organizer on the event where the user is the organizer.
What is going on?
Are all these meeting properties not settable in a CreateItem call?
Have I just accidentally bumped into three that are not settable - where can I find a list of what is actually settable (the docs at e.g. https://msdn.microsoft.com/en-us/library/aa580675%28v=exchg.80%29.aspx do mention the occasional read-only element, but not these)?
Request:
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:typ="http://schemas.microsoft.com/exchange/services/2006/types"
xmlns:mes="http://schemas.microsoft.com/exchange/services/2006/messages">
<soapenv:Header>
<typ:RequestServerVersion Version="Exchange2007_SP1"/>
<typ:MailboxCulture>en-US</typ:MailboxCulture>
<typ:TimeZoneContext>
<typ:TimeZoneDefinition Id="W. Europe Standard Time"/>
</typ:TimeZoneContext>
</soapenv:Header>
<soapenv:Body>
<mes:CreateItem SendMeetingInvitations="SendToNone">
<mes:SavedItemFolderId>
<typ:DistinguishedFolderId Id="calendar">
<typ:Mailbox>
<typ:EmailAddress>jan#TimeTellBV567.onmicrosoft.com</typ:EmailAddress>
</typ:Mailbox>
</typ:DistinguishedFolderId>
</mes:SavedItemFolderId>
<mes:Items>
<typ:CalendarItem>
<typ:Subject>recuir MODI</typ:Subject>
<typ:Body BodyType="Text"></typ:Body>
<typ:Categories>
<typ:String>TimeTell</typ:String>
</typ:Categories>
<typ:ReminderIsSet>false</typ:ReminderIsSet>
<typ:Start>2015-07-23T11:30:00.000+02:00</typ:Start>
<typ:End>2015-07-23T12:00:00.000+02:00</typ:End>
<typ:IsAllDayEvent>false</typ:IsAllDayEvent>
<typ:LegacyFreeBusyStatus>Busy</typ:LegacyFreeBusyStatus>
<typ:Location>daar</typ:Location>
<typ:IsResponseRequested>true</typ:IsResponseRequested>
<typ:MyResponseType>Organizer</typ:MyResponseType>
<typ:Organizer>
<typ:Mailbox>
<typ:Name>Jan</typ:Name>
<typ:EmailAddress>jan#somewhere.onmicrosoft.com</typ:EmailAddress>
<typ:RoutingType>SMTP</typ:RoutingType>
</typ:Mailbox>
</typ:Organizer>
<typ:RequiredAttendees>
<typ:Attendee>
<typ:Mailbox>
<typ:Name>Ben</typ:Name>
<typ:EmailAddress>ben#somewhere.onmicrosoft.com</typ:EmailAddress>
<typ:RoutingType>SMTP</typ:RoutingType>
</typ:Mailbox>
<typ:ResponseType>Unknown</typ:ResponseType>
</typ:Attendee>
</typ:RequiredAttendees>
<typ:Recurrence>
<typ:WeeklyRecurrence>
<typ:Interval>1</typ:Interval>
<typ:DaysOfWeek>Thursday</typ:DaysOfWeek>
</typ:WeeklyRecurrence>
<typ:NoEndRecurrence>
<typ:StartDate>2015-07-23+01:00</typ:StartDate>
</typ:NoEndRecurrence>
</typ:Recurrence>
<typ:MeetingTimeZone TimeZoneName="W. Europe Standard Time"/>
<typ:ConferenceType>0</typ:ConferenceType>
<typ:AllowNewTimeProposal>true</typ:AllowNewTimeProposal>
<typ:IsOnlineMeeting>false</typ:IsOnlineMeeting>
</typ:CalendarItem>
</mes:Items>
</mes:CreateItem>
</soapenv:Body>
</soapenv:Envelope>
Response:
<Envelope>
<Header>
<ServerVersionInfo MajorVersion="15" MinorVersion="1" MajorBuildNumber="213" MinorBuildNumber="21" Version="V2_47"/>
</Header>
<Body>
<CreateItemResponse>
<ResponseMessages>
<CreateItemResponseMessage ResponseClass="Error">
<MessageText>Set action is invalid for property.</MessageText>
<ResponseCode>ErrorInvalidPropertySet</ResponseCode>
<DescriptiveLinkKey>0</DescriptiveLinkKey>
<MessageXml>
<FieldURI FieldURI="calendar:Organizer"/>
</MessageXml>
<Items/>
</CreateItemResponseMessage>
</ResponseMessages>
</CreateItemResponse>
</Body>
</Envelope>
I'm currently testing with the organizer in his own calander, against Office 365, but as you can see from the request I want this to work from Exchange2007_SP1 up.
(Answering my own question)
Mmm, that question was a bit of a false alarm, but I'm leaving it here because the information is hard to find.
It turns out that the properties I attempted to modify were indeed all read-only: IsCancelled, IsOnlineMeeting, MeetingRequestWasSent and Organizer.
Quoting Kim Brand from an answer in the 'Exchange EWS set CalendarItem Organizer' post at the MS Exchange Development Forum:
Organizer is a read-only property, which means that you can't "set" that property. That's why you are seeing the error message "Set action is invalid for property".
Organizer is the party responsible for coordinating meeting attendence, and its value gets automatically set to the user that creates the CalendarItem (unless Delegate Access is used).
When I leave the above properties out of my CreateItem call, it works. A GetItem on the created/updated appointment shows that Organizer is indeed set:
<t:Organizer>
<t:Mailbox>
<t:Name>Jan</t:Name>
<t:EmailAddress>/O=EXCHANGELABS/OU=EXCHANGE ADMINISTRATIVE GROUP (FYDIBOHF23SPDLT)/CN=RECIPIENTS/CN=A9403513C6AA40E68E05776BFEA9C117-JAN</t:EmailAddress>
<t:RoutingType>EX</t:RoutingType>
<t:MailboxType>OneOff</t:MailboxType>
</t:Mailbox>
</t:Organizer>
[Edited to add]:
It is possible to set readonly properties through MAPI, see my other post
How to 'set' read-only calendar appointment properties (related to meetings)?

ValidationError when sparse updating a Payment trying to specify new LinkedTxn lines

I am trying to perform a sparse update on a QuickBooks Online Payment object using the .NET SDK. For some reason as soon as I try to specify a <Line> element in the update request, I get a ValidationError requiring a CustomerRef.
Request:
<?xml version="1.0"?>
<Payment xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" sparse="true" xmlns="http://schema.intuit.com/finance/v3">
<Id>1060</Id>
<SyncToken>3</SyncToken>
<TxnDate>2014-11-25</TxnDate>
<PrivateNote />
<Line>
<Amount>390.0000</Amount>
<LinkedTxn>
<TxnId>1308</TxnId>
<TxnType>Invoice</TxnType>
</LinkedTxn>
</Line>
<TotalAmt>390.0000</TotalAmt>
</Payment>
Response:
{"Fault": {
"Error": [{
"Message":"Required param missing, need to supply the required value for the API",
"Detail":"Required parameter CustomerRef is missing in the request",
"code":"2020",
"element":"Payment"}],
"type":"ValidationFault"},
"time":"2015-01-20T07:20:15.191-08:00"}
I thought a sparse update meant that anything you did not specify stayed the same as the original entity. I can't see anything that says one way or the other in the documentation. Do I need to fetch the CustomerRef from the current entity to feed it back to the API and keep it happy, or am I just doing something wrong?
Although this is Sparse update but I believe the customerref is required, as a 'validation check for Customer' is needed when you send the Update request. This check is needed to verify that CustomerRef for Updated payment is same as the Invoice's CustomerRef. So, you should send it in your request.

What is an InstallationID in Quickbooks QBMSXML

I have a qbmsxml that I'm sending that continues to get a response error 2000.
<qbmsxml>
<signonmsgsrq>
<signondesktoprq>
<clientdatetime>2014-04-03T09:37:23</clientdatetime>
<applicationlogin>my.application.login.id</applicationlogin>
<connectionticket>SDK-MY-Connection-Ticket</connectionticket>
<language>English</language>
<appid>9999999999</appid>
<appver>1.0</appver>
</signondesktoprq>
</signonmsgsrq>
<qbmsxmlmsgsrq>
<customercreditcardauthrq>
<transrequestid>140403937231</transrequestid>
<creditcardnumber>4111111111111111</creditcardnumber>
<expirationmonth>12</expirationmonth>
<expirationyear>2017</expirationyear>
<isecommerce>true</isecommerce>
<amount>0.01</amount>
<nameoncard>John Doe</nameoncard>
<creditcardaddress>1234 Main Street</creditcardaddress>
<creditcardpostalcode>12345</creditcardpostalcode>
</customercreditcardauthrq>
</qbmsxmlmsgsrq>
</qbmsxml>
As I've been reviewing the information on creating a request, I found an 'InstallationID' tag referenced. It goes in the element like so:
<signonmsgsrq>
<signondesktoprq>
<clientdatetime>2014-04-03T09:37:23</clientdatetime>
<applicationlogin>my.application.login.id</applicationlogin>
<connectionticket>SDK-MY-Connection-Ticket</connectionticket>
<installationid>IDTYPE</installationid>
<language>English</language>
<appid>9999999999</appid>
<appver>1.0</appver>
</signondesktoprq>
</signonmsgsrq>
My question is: What is the IDTYPE for InstallationID? Where can I get it? What options can I set it to?
I think the problem is not related to your InstallationID field at all. I think the problem is that your XML isn't conforming to what Intuit expects.
Specifically, everything in your XML request is lowercase, when Intuit expects it to be camel case. You're also missing a qbmsxml version header, and a xml version header.
Here's an example of a correctly formed request:
<?xml version="1.0" encoding="utf-8"?>
<?qbmsxml version="3.0"?>
<QBMSXML>
<SignonMsgsRq>
<SignonTicketRq>
<ClientDateTime>2009-10-09T13:14:16</ClientDateTime>
<SessionTicket>xxxxxxxxxxxxky4yL6eBtCULX1zgQ:106892184</SessionTicket>
</SignonTicketRq>
</SignonMsgsRq>
<QBMSXMLMsgsRq>
<CustomerCreditCardChargeRq>
<TransRequestID>35f9cf7cb20994e8a32e6b3e91e8e602</TransRequestID>
<CreditCardNumber>xxxxxxxxxxxx5100</CreditCardNumber>
<ExpirationMonth>10</ExpirationMonth>
<ExpirationYear>2009</ExpirationYear>
<Amount>295.00</Amount>
<NameOnCard>Keith Palmer</NameOnCard>
<CreditCardAddress>56 Cowles Road</CreditCardAddress>
<CreditCardPostalCode>06279</CreditCardPostalCode>
</CustomerCreditCardChargeRq>
</QBMSXMLMsgsRq>
</QBMSXML>
Where are you getting your syntax from? It seems very wrong... here are some good examples:
http://wiki.consolibyte.com/wiki/doku.php/quickbooks_qbms_integration