Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/247.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 元素上不允许使用尾随索利多卡因_Php_Xml_Sabre - Fatal编程技术网

Php 元素上不允许使用尾随索利多卡因

Php 元素上不允许使用尾随索利多卡因,php,xml,sabre,Php,Xml,Sabre,我正在使用soap api用php开发web应用程序。我使用如下所示的xml格式将请求发送到api,但在postman中查看xml时,我得到了类似在element companyname上不允许跟踪solidus的错误 <OTA_AirLowFareSearchRQ xmlns="http://www.opentravel.org/OTA/2003/05" ResponseType="OTA" ResponseVersion="1.9.2" Version="1.9.2" Availabl

我正在使用soap api用php开发web应用程序。我使用如下所示的
xml格式将请求发送到api,但在
postman
中查看xml时,我得到了类似在element companyname上不允许跟踪solidus的错误

<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> 

2016-03-15T11:00:00
3.

当我悬停到第5行中的交叉符号时,我得到了错误,如元素companyname上不允许使用拖尾索利多卡因,当我悬停到第6行时,我得到了错误,如忽略了意外的结束标记(requestorid)。这里我无法确定错误是什么。我认为它的xml格式正确。

请尝试以下方法:

<POS>
 <Source PseudoCityCode="ThisShouldBeYourIPCCNotJustPCCasValue">
    <RequestorID ID="1" Type="1">
        <CompanyName Code="TN">TN</CompanyName>
    </RequestorID>
 </Source>
</POS>

总氮

我今天遇到了这种情况,但我所需要做的就是将Postman中的响应查看器类型从“HTML”切换到“XML”,错误就消失了。这可能是因为响应的服务器没有正确设置
内容类型
标题-它以
text/html
的形式出现,而不是
text/xml

,实际上它与类似
的自动关闭标记有连接

只需将其替换为
,错误就会消失


希望这有帮助。

也许您需要类似于
的东西。。这里的公司名称。
后面的索利多金币是您在
中拥有的
/
。由于下一个结束标记是意外的,我假设当我打开和关闭标记时,您需要打开和关闭
,然后我会得到类似
意外结束标记(源代码)的错误。忽略更改响应的内容不是选项。