Request to 'DailySalesReport' service responds with an error. What could be the possible reason?
security1.BinarySecurityToken = security.BinarySecurityToken;
var response = client.DailySalesReportRQ(ref messageHeader, ref security1, request.DailySalesReportRQ);
I received this error too "ERR.SWS.HOST.ERROR_IN_RESPONSE".
This is the request
<?xml version="1.0" encoding="UTF-16"?>
-<DailySalesReportRQ Version="2.0.0" TimeStamp="2020-12-13T18:34:56.6500346+03:00" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SalesReport xmlns="http://webservices.sabre.com/sabreXML/2011/10" StartDate="2018-10-01" PseudoCityCode="IPCC1"/>
</DailySalesReportRQ>
This is the response
<?xml version="1.0" encoding="UTF-16"?>
-<DailySalesReportRS Version="2.0.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-<ApplicationResults xmlns="http://services.sabre.com/STL/v01" status="NotProcessed">
-<Error timeStamp="2020-12-19T18:29:41+03:00" type="BusinessLogic">
-<SystemSpecificResults>
<Message>TICKETING DATABASE ERROR</Message>
<ShortText>ERR.SWS.HOST.ERROR_IN_RESPONSE</ShortText>
</SystemSpecificResults>
</Error>
</ApplicationResults>
</DailySalesReportRS>
#Oguzhn,
First of all, you must have a credential to access Sabre's web services, since with this access you should have access to a PCC with the volume of tickets issued, that is, in the CERT.SABRE environment you should have already issued tickets in this PCC.
Once you meet this requirement you will be able to generate daily sales reports with up to 30 days retroactive ie D-30.
In your request you are using the example settings ...
StartDate="YYYY-MM-DD", only the last 30 days
PseudoCityCode = "IPCC1", travel agency sales unit
... in this case you must adjust these values with real information from the travel agency, as you are using the references in the development document.
Here is an example:
<SalesReport StartDate="2020-12-20" PseudoCityCode="4DC2"/>
You must change StartDate and PseudoCityCode to your agency's information.
Related
I am trying to prevent requests that contain a json payload with a certain attribute value from hitting my target backend.
For example:
{"status":"pending"}
If the status is "pending", I don't want it to hit my target backend until I see a status of "delivered".
What is the best way to do this?
I have a step in the proxy endpoint preflow that uses a javascript policy to identify the attribute and its value. Now that I know this, how can I prevent the request from hitting the target backend and instead just return a 200 ok to the requester?
As you have the JS to identify the attribute already, now have a policy "Raise-Fault-Attribute" in your preflow after your JS policy.
<Step>
<Condition>(Status is pending) or (Status is null)</Condition>
<Name>Raise-Fault-Attribute</Name>
</Step>
`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<RaiseFault async="false" continueOnError="false" enabled="true" name="Raise-Fault-Attribute">
<DisplayName>Raise Fault Attribute</DisplayName>
<Properties/>
<FaultResponse>
<Set>
<Headers/>
<Payload contentType="text/xml">
....
</Payload>
<StatusCode>500</StatusCode>
<ReasonPhrase>Server Error</ReasonPhrase>
</Set>
</FaultResponse>
<IgnoreUnresolvedVariables>true</IgnoreUnresolvedVariables>
</RaiseFault>
`
Hope this helps...
Sometimes I receive ERR.SWS.HOST.CONNECTOR_ERROR while invoking eTicketCouponLLSRQ and sometimes I receive valid response. What is wrong?
Thank you!
I'm working in CERT, SRW version is 2.15.2 (SDK version), PCC Z4KB, EPR 1112
RQ:
<?xml version="1.0" encoding="UTF-8"?><eTicketCouponRQ xmlns="http://webservices.sabre.com/sabreXML/2011/10" TimeStamp="2018-04-23T10:36:18.907" Version="2.0.0">
<Ticketing eTicketNumber="5552484960880"/>
</eTicketCouponRQ>
RS:
<?xml version="1.0" encoding="UTF-8"?><eTicketCouponRQ xmlns="http://webservices.sabre.com/sabreXML/2011/10" TimeStamp="2018-04-23T10:36:18.907" Version="2.0.0">
<Ticketing eTicketNumber="XXXXXXXXX0880"/>
</eTicketCouponRQ><?xml version="1.0" encoding="UTF-8" standalone="no"?><eTicketCouponRS xmlns="http://webservices.sabre.com/sabreXML/2011/10" xmlns:stl="http://services.sabre.com/STL/v01" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Version="2.0.0">
<stl:ApplicationResults status="Unknown">
<stl:Error timeStamp="2018-04-23T01:33:59-05:00" type="Application">
<stl:SystemSpecificResults>
<stl:Message>Sending request to the Host failed</stl:Message>
<stl:ShortText>ERR.SWS.HOST.CONNECTOR_ERROR</stl:ShortText>
</stl:SystemSpecificResults>
</stl:Error>
</stl:ApplicationResults>
</eTicketCouponRS>
This is likely a timeout on a Sabre backend, meaning that it was not able to process it.
If you get many of this, I recommend you to contact the Sabre API helpdesk
Sabre Support.
I am confused about the version I can use in production SOAP API
In this page, it says current production version is 3.5.0
https://developer.sabre.com/docs/soap_apis/management/itinerary/Get_Itinerary/resources
But when I test production soap api according version 3.5.0 schema, it gives me time out.
Then I copy and modify the request according to your SOAPUI project sample,
which is version 2.0.0, it works.
Does it related to the CPAId I got from my boss?
Request Samples:
soap body as version 3.5.0. it gives me time out with or without xmlns in TravelItineraryReadRQ element.
<TravelItineraryReadRQ Version="3.5.0"
xmlns="http://webservices.sabre.com/sabreXML/2011/10"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<MessagingDetails></MessagingDetails>
<UniqueID ID="AAAAAA"/>
<ReturnOptions UnmaskCreditCard="false"/>
</TravelItineraryReadRQ>
soap body version 2.0.0.0. This works perfectly.
<TravelItineraryReadRQ Version="2.0.0"
xmlns="http://webservices.sabre.com/sabreXML/2011/10" xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<MessagingDetails>
<Transaction Code="PNR"/>
</MessagingDetails>
<UniqueID ID="AAAAAA"/>
</TravelItineraryReadRQ>
Cheers
Mark Lin.
TravelItineraryReadRQ
Is it possible that you are using TravelItineraryReadLLSRQ as an ActionCode?
If so, please try with TravelItineraryReadRQ and let me know if that does it.
I have a proxy in Apigee that uses a service callout to another proxy in the same environment. I would like to set the URL host for the callout to match the host of the initial request.
For example, if a request is made in the dev environment to:
https://example-dev.apigee.com/awesome-proxy
I need to make a call to:
https://example-dev.apigee.com/support-proxy
In a test environment the first call is to:
https://example-test.apigee.com/awesome-proxy
The support call needs to go to:
https://example-test.apigee.com/support-proxy
Here is how I would like to define the service callout policy:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ServiceCallout async="false" continueOnError="false" enabled="true" name="serviceCallout">
<DisplayName>serviceCallout</DisplayName>
<FaultRules/>
<Properties/>
<Request clearPayload="true" variable="example.request">
<IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables>
</Request>
<Response>example.response</Response>
<HTTPTargetConnection>
<Properties/>
<URL>{client.host}/support-proxy</URL>
</HTTPTargetConnection>
</ServiceCallout>
This will not save and complains about no protocol. The help indicates that this must be hard coded:
<HTTPTargetConnection>/<URL> element
The URL to the service being called. While the hostname portion of URL must be hard-coded, you can supply the remainder of the URL dynamically with a variable.
I found a variable to define the URL of a service callout:
servicecallout.{policy-name}.target.url
I attempted to use an assign message policy to dynamically set the variable, as follows:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<AssignMessage async="false" continueOnError="false" enabled="true" name="assignCalloutURL">
<DisplayName>assignCalloutURL</DisplayName>
<FaultRules/>
<Properties/>
<AssignVariable>
<Name>servicecallout.serviceCallout.target.url</Name>
<Value>{client.host}</Value>
<Ref/>
</AssignVariable>
<IgnoreUnresolvedVariables>true</IgnoreUnresolvedVariables>
<AssignTo createNew="false" transport="http" type="request"/>
</AssignMessage>
This sets the URL to the literal text {client.host}
I have used the assign message policy in a similar fashion for other purposes and it actually resolves the variable listed. I'm not sure what's happening here.
client.host is not the correct variable to use, it returns an IP address 192.168....
I tried a few other variables:
proxy.url returns a strange host, it looks like internal Apigee machine names with a port. The proxy.url host times out when hit directly.
I ended up using virtualhost.aliases and proxy.pathsuffix. Here is the full JavaScript that solved it:
var base = context.getVariable("proxy.basepath");
var aliases = context.getVariable("virtualhost.aliases");
var url = "https://" + aliases[0] + base + "/support-proxy";
context.setVariable("servicecallout.serviceCallout.target.url", url);
Modifying target URLs gets a little goofy when dealing with the linter that ensures URLs have valid values.
This will not save and complains about no protocol.
This is because you're missing the scheme (https:// or http://) before the URL (client.host doesn't include scheme).
This sets the URL to the literal text {client.host}
That bit's not working properly because you need to use the ref tag to retrieve the existing variable:
<AssignVariable>
<Name>servicecallout.serviceCallout.target.url</Name>
<Ref>client.host</Ref>
</AssignVariable>
Now, that might work for the service callout, but it's not probably not going to work for setting the target URL.
I've ended up creating JavaScript policies to handle target.url, since the AssignMessage has been problematic for me:
var scheme = context.getVariable("client.scheme");
var host = context.getVariable("client.host");
var pathsuffix = context.getVariable("proxy.pathsuffix");
var newUrl = scheme + host + pathsuffix;
context.setVariable("target.url", newUrl);
Take look at this - it worked for me.
ASPNET WSRP Producer
Enviroment
Server Side
APSNETWSRPProducer (producer)
IIS
ASPNET Site
Producer Site
Client Side
Liferay 5.2.3 Tomcat 6
WSRP Proxy (consumer)
Description
I am trying to use Microsoft's ASPNET WSRP Producer.
I created a site and added a simple .aspx "Hello World!".
Created another site to host Producer.
Tried to get information from the consumer.
Liferay Log
21:24:22,379 ERROR [jsp:165] org.apache.wsrp4j.exception.WSRPException: No message found.
Nested Throwable is:
Server was unable to process request. ---> Object reference not set to an instance of an object.
at org.apache.wsrp4j.exception.WSRPXHelper.getException(WSRPXHelper.java:714)
at org.apache.wsrp4j.exception.WSRPXHelper.throwX(WSRPXHelper.java:133)
at org.apache.wsrp4j.exception.WSRPXHelper.handleWSRPFault(WSRPXHelper.java:660)
at org.apache.wsrp4j.consumer.driver.ProducerImpl.getServiceDescription(ProducerImpl.java:464)
at org.apache.wsrp4j.consumer.driver.ProducerImpl.getServiceDescription(ProducerImpl.java:391)
at org.apache.wsrp4j.consumer.driver.ProducerImpl.getPortletDescription(ProducerImpl.java:490)
at com.liferay.portlet.wsrp.WSRPProxyPortlet._getPortletDescription(WSRPProxyPortlet.java:681)
at com.liferay.portlet.wsrp.WSRPProxyPortlet._getWindowSession(WSRPProxyPortlet.java:458)
at com.liferay.portlet.wsrp.WSRPProxyPortlet._renderRemote(WSRPProxyPortlet.java:316)
at com.liferay.portlet.wsrp.WSRPProxyPortlet.render(WSRPProxyPortlet.java:133)
at com.sun.portal.portletcontainer.appengine.filter.FilterChainImpl.doFilter(FilterChainImpl.java:126)
at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:69)
at com.liferay.portlet.InvokerPortletImpl.invoke(InvokerPortletImpl.java:632)
at com.liferay.portlet.InvokerPortletImpl.invokeRender(InvokerPortletImpl.java:700)
at com.liferay.portlet.InvokerPortletImpl.render(InvokerPortletImpl.java:419)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
Producer OutPutTrace.info
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<soap:Header>
<wsa:Action>http://schemas.xmlsoap.org/ws/2004/03/addressing/fault</wsa:Action>
<wsa:MessageID>uuid:1d118ef4-8020-4fb0-a0de-4fcfaaa7e239</wsa:MessageID>
<wsa:RelatesTo>uuid:a37a4393-badf-431e-8a22-ac010ba47596</wsa:RelatesTo>
<wsa:To>http://schemas.xmlsoap.org/ws/2004/03/addressing/role/anonymous</wsa:To>
<wsse:Security>
<wsu:Timestamp wsu:Id="Timestamp-179325ab-f6b6-4370-b883-eac6998e8cbe">
<wsu:Created>2009-10-26T16:46:25Z</wsu:Created>
<wsu:Expires>2009-10-26T16:51:25Z</wsu:Expires>
</wsu:Timestamp>
</wsse:Security>
</soap:Header>
<soap:Body>
<soap:Fault>
<faultcode>soap:Server</faultcode>
<faultstring>Server was unable to process request. ---> Object reference not set to an instance of an object. </faultstring>
<detail />
</soap:Fault>
</soap:Body>
</soap:Envelope>
</log>