Trailing solidus not allowed on element

Viewed 9401

I am developing web application in php using soap api. I have the xml format as shown below to send the request to the api but I get the error like Trailing solidus not allowed on element companyname while viewing the xml in postman.

<OTA_AirLowFareSearchRQ xmlns="http://www.opentravel.org/OTA/2003/05" ResponseType="OTA" ResponseVersion="1.9.2" Version="1.9.2" AvailableFlightsOnly="true">
    <POS>
        <Source PseudoCityCode="PCC">
            <RequestorID ID="1" Type="1">
                <CompanyName Code="TN" />                            
            </RequestorID>                        
        </Source>                   

    </POS>
    <OriginDestinationInformation RPH="1">
        <DepartureDateTime>2016-03-15T11:00:00</DepartureDateTime>
        <OriginLocation LocationCode="KTM"/>
        <DestinationLocation LocationCode="DEL"/>
        <TPA_Extensions>
            <SegmentType Code="O"/>                        
        </TPA_Extensions>

    </OriginDestinationInformation>
    <TravelPreferences ValidInterlineTicket="true">
        <CabinPref PreferLevel="Preferred" Cabin="Y" />
        <TPA_Extensions>
            <TripType Value="Return" />
            <LongConnectTime Min="780" Max="1200" Enable="true" />
            <ExcludeCallDirectCarriers Enabled="true" />                        
        </TPA_Extensions>

    </TravelPreferences>
    <TravelerInfoSummary>
        <SeatsRequested>3</SeatsRequested>
        <AirTravelerAvail>
            <PassengerTypeQuantity Code="ADT" Quantity="2" />
            <PassengerTypeQuantity Code="CHD" Quantity="1" />                        
        </AirTravelerAvail>                    
    </TravelerInfoSummary>
    <TPA_Extensions>
        <IntelliSellTransaction>
            <RequestType Name="50ITINS" />                        
        </IntelliSellTransaction>                    
    </TPA_Extensions>                
</OTA_AirLowFareSearchRQ> 

I had googled the error but not found any solution. I also cannot determine what the error say so I need some help.

Screenshot: enter image description here

When I hover to the cross sign in line 5 I get the error like Trailing solidus not allowed on element companyname and when I hover to the line 6 I get error like Unexpected end tag (requestorid) ignored. Here I cannot determined what the error says. I think it's in the correct xml format.

3 Answers

Actually this has connection to self closing tag like <CompanyName Code="TN" />.

Just replace this with <CompanyName Code="TN"></CompanyName> and the error goes away.

Hope this helps.

Related