Bad envelope tag: SOAP service - soap

When I try to test a SOAP request, I get the following error in the console
Bad envelope tag: EbMtvnSvcReq
<?xml version='1.0' encoding='utf-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server.userException</faultcode>
<faultstring>org.xml.sax.SAXException: Bad envelope tag: EbMtvnSvcReq</faultstring>
<detail>
<ns1:hostname xmlns:ns1="http://xml.apache.org/axis/">d05jbapp12</ns1:hostname>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
I am testing this SOAP request in Postman tool.
Here is my request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://epayments.metavante.com/types/request" xmlns:com="http://metavante.com/types/common" xmlns:req1="http://epayments.metavante.com/types/consumer/request" xmlns:com1="http://epayments.metavante.com/types/common" xmlns:req2="http://epayments.metavante.com/types/event/request" xmlns:req3="http://epayments.metavante.com/types/statistics/request" xmlns:req4="http://epayments.metavante.com/types/notification/request" xmlns:req5="http://epayments.metavante.com/types/security/request" xmlns:req6="http://epayments.metavante.com/types/paymentRule/request" xmlns:req7="http://epayments.metavante.com/types/fi/request" xmlns:req8="http://epayments.metavante.com/types/fundingProfile/request" xmlns:req9="http://epayments.metavante.com/types/transferAccount/request" xmlns:req10="http://epayments.metavante.com/types/merchant/request" xmlns:req11="http://epayments.metavante.com/types/consumerPayee/request" xmlns:req12="http://epayments.metavante.com/types/payment/request" xmlns:req13="http://epayments.metavante.com/types/user/request" xmlns:req14="http://epayments.metavante.com/types/bill/request" xmlns:req15="http://epayments.metavante.com/types/category/request" xmlns:req16="http://epayments.metavante.com/types/report/request" xmlns:req17="http://epayments.metavante.com/types/alert/request" xmlns:req18="http://epayments.metavante.com/types/banking/request" xmlns:req19="http://epayments.metavante.com/types/messaging/request" xmlns:req20="http://epayments.metavante.com/types/recipient/request" xmlns:req21="http://epayments.metavante.com/types/transfer/request" xmlns:req22="http://epayments.metavante.com/types/transferRule/request" xmlns:req23="http://epayments.metavante.com/types/giftcard/request">
<soapenv:Header>
<ActivityId xmlns="http://epayments.metavante.com/types/request" CorrelationId="10018d27-2573-4d6b-8bcb-b49f6c686f1a">5d827c1d-bd7b-437f-904f-5f82c9844022</ActivityId>
</soapenv:Header>
<soapenv:Body>
<req:EbMtvnSvcReq>
<req:MtvnSvcVer>v1.1.0</req:MtvnSvcVer>
<req:MsgUUID>eE64A6fA-c7Dc-1e3f-D95E-94092c95B5A7</req:MsgUUID>
<req:PrcsParms>
<req:SrcID>MVEPAY</req:SrcID>
</req:PrcsParms>
<req:Svc>
<req:SvcParms>
<req:ApplID>ZELLE_UAT</req:ApplID>
<req:SvcID>GetConsumerDetails</req:SvcID>
<req:SvcVer>v1.6.0</req:SvcVer>
<req:RqstUUID>892e6e60-294d-451a-9c65-5f09c8f0e999</req:RqstUUID>
<req:RoutingID>sandbox</req:RoutingID>
</req:SvcParms>
<req:MsgData>
<req:GetConsumerDetails>
<com:channelName>WEB</com:channelName>
<com:locale>en-US</com:locale>
<com:userId>JimZelle1</com:userId>
</req:GetConsumerDetails>
</req:MsgData>
</req:Svc>
</req:EbMtvnSvcReq>
</soapenv:Body>
</soapenv:Envelope>

You SOAPMessage i.e. SOAPEnvelope is in correct, your missing,
</soap:Header> and </soap:Envelope> enclosing Tags.
Correct XML should be something like below.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://epayments.metavante.com/types/request" xmlns:com="http://metavante.com/types/common" xmlns:req1="http://epayments.metavante.com/types/consumer/request" xmlns:com1="http://epayments.metavante.com/types/common" xmlns:req2="http://epayments.metavante.com/types/event/request" xmlns:req3="http://epayments.metavante.com/types/statistics/request" xmlns:req4="http://epayments.metavante.com/types/notification/request" xmlns:req5="http://epayments.metavante.com/types/security/request" xmlns:req6="http://epayments.metavante.com/types/paymentRule/request" xmlns:req7="http://epayments.metavante.com/types/fi/request" xmlns:req8="http://epayments.metavante.com/types/fundingProfile/request" xmlns:req9="http://epayments.metavante.com/types/transferAccount/request" xmlns:req10="http://epayments.metavante.com/types/merchant/request" xmlns:req11="http://epayments.metavante.com/types/consumerPayee/request" xmlns:req12="http://epayments.metavante.com/types/payment/request" xmlns:req13="http://epayments.metavante.com/types/user/request" xmlns:req14="http://epayments.metavante.com/types/bill/request" xmlns:req15="http://epayments.metavante.com/types/category/request" xmlns:req16="http://epayments.metavante.com/types/report/request" xmlns:req17="http://epayments.metavante.com/types/alert/request" xmlns:req18="http://epayments.metavante.com/types/banking/request" xmlns:req19="http://epayments.metavante.com/types/messaging/request" xmlns:req20="http://epayments.metavante.com/types/recipient/request" xmlns:req21="http://epayments.metavante.com/types/transfer/request" xmlns:req22="http://epayments.metavante.com/types/transferRule/request" xmlns:req23="http://epayments.metavante.com/types/giftcard/request">
<soapenv:Header>
<ActivityId xmlns="http://epayments.metavante.com/types/request" CorrelationId="10018d27-2573-4d6b-8bcb-b49f6c686f1a">5d827c1d-bd7b-437f-904f-5f82c9844022</ActivityId>
</soapenv:Header>
<soapenv:Body>
<req:EbMtvnSvcReq>
<req:MtvnSvcVer>v1.1.0</req:MtvnSvcVer>
<req:MsgUUID>eE64A6fA-c7Dc-1e3f-D95E-94092c95B5A7</req:MsgUUID>
<req:PrcsParms>
<req:SrcID>MVEPAY</req:SrcID>
</req:PrcsParms>
<req:Svc>
<req:SvcParms>
<req:ApplID>ZELLE_UAT</req:ApplID>
<req:SvcID>GetConsumerDetails</req:SvcID>
<req:SvcVer>v1.6.0</req:SvcVer>
<req:RqstUUID>892e6e60-294d-451a-9c65-5f09c8f0e999</req:RqstUUID>
<req:RoutingID>sandbox</req:RoutingID>
</req:SvcParms>
<req:MsgData>
<req:GetConsumerDetails>
<com:channelName>WEB</com:channelName>
<com:locale>en-US</com:locale>
<com:userId>JimZelle1</com:userId>
</req:GetConsumerDetails>
</req:MsgData>
</req:Svc>
</req:EbMtvnSvcReq>
</soapenv:Body>
</soapenv:Envelope>

Related

sabre car new bookAPI EnhancedVehBookRQ

I tried to call EnhancedVehBookRQ API with CERT ENV
This is my request and response
REQUEST:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sec="http://schemas.xmlsoap.org/ws/2002/12/secext" >
<soapenv:Header>
<Security xmlns="http://schemas.xmlsoap.org/ws/2002/12/secext">
<BinarySecurityToken>
token
</BinarySecurityToken>
</Security>
<MessageHeader xmlns="http://www.ebxml.org/namespaces/messageHeader">
<From>
<PartyId type="urn:x12.org:IO5:01">from</PartyId>
</From>
<To>
<PartyId type="urn:x12.org:IO5:01">to</PartyId>
</To>
<CPAId>hiddendata
</CPAId>
<ConversationId>hiddendata</ConversationId>
<Action>EnhancedVehBookRQ</Action>
<MessageData>
<MessageId>1001</MessageId>
<Timestamp>2021-08-18T10:00:01</Timestamp>
<!--Optional:-->
<TimeToLive>2021-08-19T10:00:01</TimeToLive>
<!--Optional:-->
<Timeout>0</Timeout>
</MessageData>
</MessageHeader>
</soapenv:Header>
<soapenv:Body>
<EnhancedVehBookRQ xmlns="http://services.sabre.com/sp/enhanced/veh/book/v1" version="1.0.0">
<VehBook>
<BookingInfo >
<BookingKey>23accd05-4770-4d1c-a286-ab0e6f360fc5
</BookingKey>
</BookingInfo>
<Customer NameNumber="1.1">
<Address>
<CityName>DALLAS</CityName>
<CountryCode>US</CountryCode>
<PostalCode>12345</PostalCode>
<StateCountyProv StateCode="TX" />
<StreetNmbr>1234 TEST ADDRESS</StreetNmbr>
</Address>
</Customer>
<RentalPaymentPrefs>
<GuaranteePrepaid Type="GUARANTEE">
<PaymentCard>
<CardCode>DC</CardCode>
<CardNumber>311234567685619</CardNumber>
<ExpiryMonth>12</ExpiryMonth>
<ExpiryYear>2022</ExpiryYear>
<FullCardHolderName>
<LastName>Monster</LastName>
</FullCardHolderName>
</PaymentCard>
</GuaranteePrepaid>
</RentalPaymentPrefs>
<VehRentalCore Quantity="1" />
</VehBook>
</EnhancedVehBookRQ>
</soapenv:Body>
</soapenv:Envelope>
I could not move ahead with car booking, getting errors like this
<Message code="ERR.SP.INTERNAL_ERROR">TravelItineraryReadRQ: After maximum retry count it was not possible to successfully execute target service</Message>
Can anybody please confirm whether SOAP requst is proper or not or I am missing something from my side
Yes, before running EnhancedVehBookRQ API you need to run PassengerDetailsRQ with TravelIntinerary details in it. On the success of this API use the response details for the request of this API and then run it

Postman test fails while parsing the xml soap response

I am using POSTMAN to send a SOAP request and below is my soapenv response received. I would like to test for the below value received in my postman test, but the post man test fails, could someone advise on what to do here ?
LicStatus
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:schemas.general.com.au:api:other">
<soapenv:Header xmlns:urn="urn:schemas.general.com.au:api:other" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<header xmlns:urn="urn:schemas.general.com.au:api:other" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://schemas.cordys.com/General/1.0/">
<msg-id>005056B9-3921-A1E9-A327-64509F7362DC</msg-id>
<messageoptions noreply="true"/>
</header>
</soapenv:Header>
<soapenv:Body>
<getSupplierDataResponse xmlns:urn="urn:schemas.general.com.au:api:other" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns="urn:schemas.general.com.au:api:other" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns6="http://schemas.cordys.com/default_005056B9-5D92-A1E9-904D-128C719CE2DD" xmlns:ns5="http://schemas.cordys.com/casemanagement/1.0" xmlns:ns4="http://schemas.XXTGGHG.org/2004/07/STRD.Models" xmlns:ns3="urn:schemas.general.com.au:canonical:technical:v1" xmlns:ns2="urn:schemas.general.com.au:api:other" xmlns:bpm="http://schemas.cordys.com/default" xmlns:sm="http://www.w3.org/2005/07/scxml" xmlns:instance="http://schemas.cordys.com/bpm/instance/1.0">
<CustomerData>
<DateLicenceExpires>28/01/2020</DateLicenceExpires>
<Demonstration_Method>Certification</Demonstration_Method>
<AuditLastAuditDate>05/03/2018</AuditLastAuditDate>
<AuditOutcome>Non Compliance</AuditOutcome>
<HeadOfficeRegion/>
<ScopeOfLicencing>YES</ScopeOfLicencing>
<LicStatus>Licensed</LicStatus>
</CustomerData>
<OperationResult xmlns="urn:schemas.general.com.au:canonical:technical:v1">
<Status>00</Status>
<StatusMessage>Success</StatusMessage>
</OperationResult>
</getSupplierDataResponse>
</soapenv:Body>
</soapenv:Envelope>
Below is the post man test:
pm.test('Verify the LicStatus', function() {
var responseJson = xml2Json(responseBody);
pm.expect(responseJson.results[0].LicStatus).to.eql("Licensed");
})
Try something like this:
pm.test('Verify the LicStatus', function() {
var xmlTree = xml2Json(responseBody);
var licenseStatus = xmlTree['soapenv:Envelope']['soapenv:Body'].getSupplierDataResponse.CustomerData.LicStatus;
pm.expect(licenseStatus).to.eql("Licensed");
})

Unable to update passenger name in created PNR at sabre

I am developing API to update passenger detail like name and DOB in PNR.
I followed this http://files.developer.sabre.com/doc/providerdoc/pnrservices/UpdateReservationRQ_1_15_0_User_Guide.pdf
Request xml
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sec="http://schemas.xmlsoap.org/ws/2002/12/secext" xmlns:eb="http://www.ebxml.org/namespaces/messageHeader" xmlns:v1="http://webservices.sabre.com/pnrbuilder/v1_15" xmlns:v11="http://services.sabre.com/res/or/v1_8">
<soapenv:Header>
<sec:Security xmlns:sec="http://schemas.xmlsoap.org/ws/2002/12/secext">
<sec:BinarySecurityToken valueType="String" EncodingType="sec:Base64Binary">${#Project#sessionid}</sec:BinarySecurityToken>
</sec:Security>
<eb:MessageHeader eb:version="2.0">
<eb:From>
<eb:PartyId type="urn:x12.org:IO5:01">999999</eb:PartyId>
</eb:From>
<eb:To>
<eb:PartyId type="urn:x12.org:IO5:01">343434</eb:PartyId>
</eb:To>
<eb:CPAId>AB</eb:CPAId>
<eb:ConversationId>test123</eb:ConversationId>
<eb:Service eb:type="OTA">UpdateReservationRQ</eb:Service>
<eb:Action>UpdateReservationRQ</eb:Action>
<eb:MessageData>
<eb:MessageId>1001</eb:MessageId>
<eb:Timestamp>2017-01-10T10:00:00</eb:Timestamp>
<eb:TimeToLive>2017-01-16T23:59:59</eb:TimeToLive>
</eb:MessageData>
</eb:MessageHeader>
</soapenv:Header>
<soapenv:Body>
<v1:UpdateReservationRQ Version="1.15.0">
<v1:RequestType>Stateless</v1:RequestType>
<v1:ReturnOptions IncludeUpdateDetails="true" RetrievePNR="true" />
<v1:ReservationUpdateList>
<v1:Locator>${#Project#pnr}</v1:Locator>
<v1:ReservationUpdateItem>
<!--Optional:-->
<v1:PassengerNameUpdate op="U">
<!--Optional:-->
<v1:TravelerName type="ADT">
<!--Optional:-->
<v1:Given>Ramesh</v1:Given>
<v1:Surname>Tiwari</v1:Surname>
</v1:TravelerName>
<!--Optional:-->
<v1:NameAssociationTag>
<v1:LastName>Praveen</v1:LastName>
<v1:FirstName>Deshmukh</v1:FirstName>
<v1:NameRefNumber>01.01</v1:NameRefNumber>
</v1:NameAssociationTag>
</v1:PassengerNameUpdate>
<!--Optional:-->
</v1:ReservationUpdateItem>
<v1:ReceivedFrom>
<v1:AgentName>AESWSSELL1AEBG</v1:AgentName>
</v1:ReceivedFrom>
</v1:ReservationUpdateList>
</v1:UpdateReservationRQ>
</soapenv:Body>
</soapenv:Envelope>
But continually getting below error.
<soap-env:Body>
<stl15:UpdateReservationRS xmlns:stl15="http://webservices.sabre.com/pnrbuilder/v1_15" xmlns:ns6="http://services.sabre.com/res/orr/v0" xmlns:raw="http://tds.sabre.com/itinerary" xmlns:or18="http://services.sabre.com/res/or/v1_8" xmlns:ns4="http://webservices.sabre.com/pnrconn/ReaccSearch">
<stl15:Success>FALSE</stl15:Success>
<stl15:Warnings>
<stl15:Warning>
<stl15:Message>PARTIAL ERROR</stl15:Message>
</stl15:Warning>
</stl15:Warnings>
<stl15:Errors>
<stl15:Error UpdateId="">
<stl15:Code>500601</stl15:Code>
<stl15:Message>UNABLE TO PROCESS</stl15:Message>
</stl15:Error>
</stl15:Errors>
<stl15:Results/>
</stl15:UpdateReservationRS>
</soap-env:Body>
Please help me to find out what change in require in the request.
Hard to tell without knowing the carrier, but many airlines will not allow a name change once the PNR has been "ended" and a locator has been returned.
It is possible to update passenger detail in created PNR.
In above request require PNR created date to compete this process.
<stl1:Locator>XPKCGL</stl1:Locator>
<stl1:CreateDate>2017-05-23</stl1:CreateDate>
Below is complete request.
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:eb="http://www.ebxml.org/namespaces/messageHeader" xmlns:ns1="http://webservices.sabre.com/pnrbuilder/getres" xmlns:ns12="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns13="http://www.w3.org/1999/xlink" xmlns:ns14="http://www.w3.org/2000/09/xmldsig#" xmlns:or="http://services.sabre.com/res/or/v1_8" xmlns:ota="http://webservices.sabre.com/sabreXML/2003/07" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:stl1="http://webservices.sabre.com/pnrbuilder/v1_15" xmlns:stl2="http://services.sabre.com/STL/v01" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/12/secext" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xml="http://www.w3.org/XML/1998/namespace">
<SOAP-ENV:Header>
<sec:Security xmlns:sec="http://schemas.xmlsoap.org/ws/2002/12/secext">
<sec:BinarySecurityToken valueType="String" EncodingType="sec:Base64Binary">${#Project#sectoken}</sec:BinarySecurityToken>
</sec:Security>
<MessageHeader xmlns="http://www.ebxml.org/namespaces/messageHeader" version="1.0">
<eb:From>
<eb:PartyId type="urn:x12.org:IO5:01">99935345999</eb:PartyId>
</eb:From>
<eb:To>
<eb:PartyId type="urn:x12.org:IO5:01">344535</eb:PartyId>
</eb:To>
<eb:CPAId>AB</eb:CPAId>
<eb:ConversationId>cpm23432</eb:ConversationId>
<eb:Service type="OTA">UpdateReservationOperation</eb:Service>
<eb:Action>UpdateReservationRQ</eb:Action>
<eb:MessageData>
<eb:MessageId>608926</eb:MessageId>
<eb:Timestamp>2017-05-22T15:49:07Z</eb:Timestamp>
</eb:MessageData>
</MessageHeader>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<stl1:UpdateReservationRQ xmlns="http://webservices.sabre.com/pnrbuilder/v1_15" Version="1.15.0">
<stl1:RequestType>Stateless</stl1:RequestType>
<stl1:ReturnOptions IncludeUpdateDetails="true" RetrievePNR="true" />
<stl1:ReservationUpdateList>
<stl1:Locator>XPKCGL</stl1:Locator>
<stl1:CreateDate>2017-05-23</stl1:CreateDate>
<stl1:ReservationUpdateItem UpdateId="ID-1">
<stl1:PassengerNameUpdate op="U">
<stl1:TravelerName type="ADT" referenceId="1">
<stl1:Given>RamRaj</stl1:Given>
<stl1:Surname>Des</stl1:Surname>
</stl1:TravelerName>
<stl1:NameAssociationTag>
<stl1:LastName>DESHMUKH</stl1:LastName>
<stl1:FirstName>PRAVEEN</stl1:FirstName>
<stl1:NameRefNumber>01.01</stl1:NameRefNumber>
</stl1:NameAssociationTag>
</stl1:PassengerNameUpdate>
</stl1:ReservationUpdateItem>
<stl1:ReceivedFrom>
<stl1:AgentName>CPM MBE</stl1:AgentName>
</stl1:ReceivedFrom>
</stl1:ReservationUpdateList>
</stl1:UpdateReservationRQ>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Cannot invoke method last() on null object in soap ui

I am new to soap ui. I am trying to fetch list of files using groovy and trigger the soap UI for the same files. groovy script us running fine.but in request I am getting response stating that "Cannot invoke method last() on null object".Am I missing something:
Here is my groovy script:
def fileList = []
File theInfoName = new File("D:\\SOAP")
theInfoName.eachFile { file ->
if (file.isFile() && file.name.endsWith('.txt')) {
fileList.add(file)
}
}
log.info fileList
//context.put('fileList', fileList)
Here is my request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://www.webserviceX.NET">
<soapenv:Header/>
<soapenv:Body>
${=new File("D:\\SOAP\\" + (context.get('fileList')).last()).text}
</soapenv:Body>
</soapenv:Envelope>
but when I see in request messageExchangeResults it is showing:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://www.webserviceX.NET">
<soapenv:Header/>
<soapenv:Body>
Cannot invoke method last() on null object
</soapenv:Body>
</soapenv:Envelope>

Cannot send Soap Request as String using Retrofit 2.0

I tried sending Soap Request as String using Retrofit 2.0 but it always add myrequestString .
Do you know how to send an String SoapUI format via Retrofit 2.0?
Here is my code:
MyService.java:
#Headers({
"Content-Type: text/xml"
})
#POST
Call<ResponseBody> loadRepo(#Url String url,#Body String body);
String to send request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="">
<soapenv:Header/>
<soapenv:Body>
<web:ValidateLink>
<Request>
...
Request actual:
<string><?xml version=&apos;1.0&apos; encoding=&apos;UTF-8&apos; standalone=&apos;yes&apos; ?><soapenv:Envelope xmlns:au
...
;/soapenv:Body></soapenv:Envelope></string>
Request Expected:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="">
<soapenv:Header/>
<soapenv:Body>
<web:ValidateLink>
<Request>