请求是在lowerase,但我需要它以大写

时间:2012-11-20 17:37:43

标签: php xml soap curl

我使用php curl发送xml请求。在我的请求中,一些字段名称应该以大写字母开头(我提到那些字段名称应该如何)。但它仍然是小写的。我该怎么做呢?

2 个答案:

答案 0 :(得分:0)

很抱歉发布作为答案。我无法在任何地方找到评论选项。我需要像这样的xml请求:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" >
   <soapenv:Header/>
   <soapenv:Body>
      <air:AirFareRulesReq AuthorizedBy="TESTANTON" TargetBranch="P7001111" FareRuleType="long" xmlns:air="http://www.travelport.com/schema/
air_v19_0" xmlns:com="http://www.travelport.com/schema/common_v16_0">
         <com:BillingPointOfSaleInfo OriginApplication="UAPI" />
<air:FareRuleKey FareInfoRef="14T" ProviderCode="1G">FHcM8l7q63v/G5z8j/CiSvIYR/AK2reE8hhH8Arat4TyGEfwCtq3hPIYR/AK2reE8hhH8Arat4SiBqSlMvperpf
bDog/Mc2J2TESwC6wJMGZOWvR8a1uvgdHqnJfNnjXSThOF7Yf/4nzNw8iNFPKRmV+vNt9FsbEDsg7Xummptbd/PGLBLSyKXy9W2d7tLsM5N7g0na1IcjTya7v5djkVgcG/pKSbKDfv/n/
kRkYvfgcBJkx0hW0SfC1tY+6Yy6VwuwsqK0SegZYgX1nXtpVVslwP480sMwgyXA/jzSwzCDJcD+PNLDMIMlwP480sMwgyXA/jzSwzCAXbsOY16yrQ1DwcNZE2Yzea5wF63H/JTFZ01OZM
voUnL1IOp41q/BsrBeT+3Z63h217snf7RR0VJJEnEYAZ7eV</air:FareRuleKey>
         <air:AirFareRulesModifier>
            <air:AirFareRuleCategory FareInfoRef="14T">
               <air:CategoryCode>APP</air:CategoryCode>
            </air:AirFareRuleCategory>
         </air:AirFareRulesModifier>
      </air:AirFareRulesReq>
   </soapenv:Body>
</soapenv:Envelope>

请注意大写字母,这是强制性的。

我的要求是这样的:

<soapenv:envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:body>
<air:airfarerulesreq xmlns:com="http://www.travelport.com/schema/common_v13_0" xmlns:air="http://www.travelport.com/schema/air_v16_0" "fareruletype"="Long" targetbranch="P107616">
<com:billingpointofsaleinfo originapplication="UAPI"></com:billingpointofsaleinfo>
<air:farerulekey providercode="1G" fareinforef="44T">VfgHAhY Nhf/G5z8j/CiSvIYR/AK2reE8hhH8Arat4TyGEfwCtq3hPIYR/AK2reE8hhH8Arat4SiBqSlMvpergS7HuspGY352TESwC6wJMHsXnCFARYTWZY1YvPgjqOCzzW0/Nh6JtAzgQUSP1/IM8Yn1FXVDIqmcYHmrXnDiHnd/PGLBLSyKXy9W2d7tLsMHzb3cbyuLc GNAyz6v1ZFEPa7JFvMahSiwm2eLyf6pocBJkx0hW0SfC1tY 6Yy6VHCuulQ9kPjUcMGFNslp sIe5YuTqwmZj8hhH8Arat4TyGEfwCtq3hPIYR/AK2reE8hhH8Arat4SiBqSlMvperqgKexWX41ThbPvfd1U/G2H0PjtqkLQYO9cYH8h6O0FT0G9ohvsxSLDfFXKeEVySPPFcEj7k/sLn</air:farerulekey>
</air:airfarerulesreq>
</soapenv:body>
</soapenv:envelope>

我需要大写的单词是小写的。

我确信服务器没有将其设为小写

答案 1 :(得分:0)

$soap_request  ="<?xml version=\"1.0\" encoding=\"UTF-8\"?> "
."<soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/>"
//. "<soapenv:Header /> "
.  "<soapenv:Body>"
."<air:AirFareRulesreq targetbranch=\"P107616\" Fareruletype=\"Long\" xmlns:air=\"http://www.travelport.com/schema/air_v16_0\" xmlns:com=\"http://www.travelport.com/schema/common_v13_0\" >" 
."<com:BillingPointOfSaleInfo OriginApplication=\"UAPI\">" ."</com:BillingPointOfSaleInfo>"
."<air:FareRuleKey FareInfoRef=$farere ProviderCode=\"1G\">$farerulekk"
."</air:FareRuleKey> " 
."</air:AirFareRuleReq>"
. "</soapenv:Body>"
."</soapenv:Envelope>"
."?>";
相关问题