The API works fine on ReadyAPI, but on the website, the API

I hope you’re doing well. I have successfully implemented SOAP XML in ReadyAPI, and it’s functioning properly. However, I’m encountering an issue with Postman. This problem might be related to headers. Could you kindly provide some guidance on this matter? In fact, if the API works in Postman, it could potentially help resolve the issues on my website and it supports SOAP API. For your information, the first, second, and third APIs work fine. However, there is an issue with the fourth API. For example, when we send the request for the first API, we receive a token. We then pass this token in the second step, and again in the third step. However, in the fourth step, an issue arises.

This is nearly always a case of reading the spec for the API to find out what it needs. No one here can tell you that unless they have used the specific API.

I’m not talking about ReadyAPI here, but the Soap API. Read the WSDL to understand what it needs.

On a side note, can I suggest that you read the template description when posting a new topic.

  • Additional Data: Include additional data that might help someone reproduce your issue - for example, code, collections, data dumps, console errors, screenshots or gifs.

The important part here is the example code, and screenshots. You haven’t even told us what happens with the forth request. What is it failing on?

On a side note, ReadyAPI is another API testing tool to a certain extent.

The same principles as Postman will apply. There should be a log of what was sent for any particular request, where you should be able to check what was sent, including any headers. Which means you should be able to analyse both side by side to see if there are any differences that might explain the issue.

postmanapi
readyapi
can you check this video and postman supports SOAP API, the first, second, and third APIs work fine. However, there is an issue with the fourth API. For example, when we send the request for the first API, we receive a token. We then pass this token in the second step, and again in the third step. However, in the fourth step, an issue arises

I can’t read the error properly. It goes too fast, and I have no way of pausing the video.

All you really need to do is copy and paste the error as text (Please use the preformatted text option in the editor when pasting code to stop everything from being aligned to the left).

In ReadyAPI, you have the raw request that is sent.

Start here, and that is what you will need to try and mirror in Postman.

Check what is being sent and compare it to what is showing in the console log for the request in Postman.

Readyapi: readyapi.mp4 - Google Drive
Postman: postmanapi.mp4 - Google Drive

This is error

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
    <s:Body>
        <CreatePNRResponse xmlns="http://tempuri.org/">
            <CreatePNRResult xmlns:a="http://schemas.datacontract.org/2004/07/Radixx.ConnectPoint.Reservation.Response" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
                <a:Key i:nil="true"/>
                <a:SeriesNumber i:nil="true"/>
                <a:ConfirmationNumber i:nil="true"/>
                <a:BookingAgent i:nil="true"/>
                <a:CRSCode i:nil="true"/>
                <a:TravelGroupID>0</a:TravelGroupID>
                <a:IATANumber i:nil="true"/>
                <a:ExternalAppID i:nil="true"/>
                <a:WebBookingID i:nil="true"/>
                <a:PromotionalID>0</a:PromotionalID>
                <a:PromotionalCode i:nil="true"/>
                <a:RecieptLanguageID>0</a:RecieptLanguageID>
                <a:ReservationCurrency>AED</a:ReservationCurrency>
                <a:ProfileID>0</a:ProfileID>
                <a:PNRPin>0</a:PNRPin>
                <a:BookDate>0001-01-01T00:00:00</a:BookDate>
                <a:ReservationType i:nil="true"/>
                <a:TodaysDate>0001-01-01T00:00:00</a:TodaysDate>
                <a:LastModified>0001-01-01T00:00:00</a:LastModified>
                <a:ReservationExpirationDate>0001-01-01T00:00:00</a:ReservationExpirationDate>
                <a:CorporationID i:nil="true"/>
                <a:SecurityGuid i:nil="true"/>
                <a:HasTickets>false</a:HasTickets>
                <a:ValuePackageData i:nil="true"/>
                <a:UserIPAddress i:nil="true"/>
                <a:ManageBookingAgent i:nil="true"/>
                <a:HistoricConfirmationNum i:nil="true"/>
                <a:Cabin i:nil="true"/>
                <a:ReservationBalance>0</a:ReservationBalance>
                <a:ChangeFee>0</a:ChangeFee>
                <a:LogicalFlightCount>0</a:LogicalFlightCount>
                <a:ActivePassengerCount>0</a:ActivePassengerCount>
                <a:BalancedReservation>false</a:BalancedReservation>
                <a:ReservationFulfillmentRequiredByGMT>0001-01-01T00:00:00</a:ReservationFulfillmentRequiredByGMT>
                <a:ReservationFulfillmentRequiredByODT>0001-01-01T00:00:00</a:ReservationFulfillmentRequiredByODT>
                <a:Airlines/>
                <a:Payments/>
                <a:History/>
                <a:Comments/>
                <a:GDSHistory/>
                <a:ReservationContacts/>
                <a:ContactInfos/>
                <a:Vouchers/>
                <a:Cars/>
                <a:Hotels/>
                <a:Packages/>
                <a:Exceptions xmlns:b="http://schemas.datacontract.org/2004/07/Radixx.ConnectPoint.Exceptions">
                    <b:ExceptionInformation.Exception>
                        <b:ExceptionCode>9999</b:ExceptionCode>
                        <b:ExceptionDescription>&#xD;
Additional Source Information: ERR9999: Unexpected error in Rbo_SaveReservation. Error Details: ORA-20001: { ERROR : CREATE_PNR_RRFO_XML_REFORA-06502: PL/SQL: numeric or value error: character string buffer too small }\n { DBMS_UTILITY.FORMAT_ERROR_STACK ==+ &gt; ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at "RA.PKG_RRFO_HYBRID", line 1557
 } \n { DBMS_UTILITY.FORMAT_CALL_STACK ===&gt; ----- PL/SQL Call Stack -----
  object      line  object
  handle    number  name
0xbcf78d68      2616  package body RA.PKG_RRFO_HYBRID.CREATE_PNR_RRFO_XML_REF
0xbb892b00         1  anonymous block
 }\n
ORA-06512: at "RA.PKG_RRFO_HYBRID", line 2616
ORA-06512: at line 1</b:ExceptionDescription>
                        <b:ExceptionSource>CreatePNR</b:ExceptionSource>
                        <b:ExceptionLevel>Critical</b:ExceptionLevel>
                    </b:ExceptionInformation.Exception>
                </a:Exceptions>
            </CreatePNRResult>
        </CreatePNRResponse>
    </s:Body>
</s:Envelope>

The trace stack is not really telling me anything obvious.

On face value, I would have said this is server side and to go discuss with a DEV or whoever maintains the API (as the API is crashing and not handling the error very well).

However if it works in ReadyAPI then it should work in Postman, and we are back to checking the raw body that was sent and comparing the two in the first instance (and then speaking to a DEV).

I hope that you can promptly resolve this issue, and I would appreciate it if you could provide an expected time frame for its resolution.

Thank you!

Not sure what you mean by that.

This is a forum. I don’t work for Postman and this isn’t really a Postman issue per se.

It’s more of a what are the correct settings for my API query. Where I recommend that you discuss it with the developer of the API in question.

Oh, I see. Do you have any idea what the main issue might be?

No as the trace stack\error handling in the API is not being very descriptive.

On face value, as other requests are working, and its also running in ReadyAPI, then it would appear to be something wrong with the request.

You are missing an element or header, or something similar.

As the error handling is not very descriptive, then my initial recommendation is to investigate the raw body in ReadyAPI and compare that with the console logs in Postman.

My further recommendation is to to discuss this with a DEV or the supplier of the API that you are trying to consume. Hopefully they will be able to add more on what that error actually means.

1 Like

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.