cfx_http5 SOAP XML发布问题

时间:2012-11-27 16:38:36

标签: soap coldfusion

我在下面的示例中使用CFX_HTTP5将XML发布到SSL URL。当我发布它时会生成两个变量:RESULT&状态。 当RESULT变量为EMPTY时,STATUS正常。

这里可能有什么问题?

<cfsavecontent variable="xmlRequest">
    <SOAP:Envelope xmlns:SOAP="urn:schemas-xmlsoap-org:soap.v1">
      <SOAP:Header>
        <AccountNumber>XXXXXXX</AccountNumber>
        <AuthorisationCode>XXXXXXX</AuthorisationCode>
        <Source>xs</Source>
      </SOAP:Header>
      <SOAP:Body>
          <PostAdvert>
               <Adverts>
                    <Advert>
                         <MarketID>01</MarketID>
                         <AccountNumber>XXXXXX</AccountNumber>
                         <AdvertiserID/>
                         <Contact>RECRUITadvantage Administrator</Contact>
                         <Telephone/>
                         <Fax/>
                         <Email/>
                         <EmailComments/>
                         <Position>Test Job 1 - Jobserve New - DO NOT APPLY</Position>
                         <Skills/>
                         <SkillsExtra/>
                         <HtmlSkills><![CDATA[<p>Test Job 1 - Jobserve New Test Job 1 - Jobserve New Test Job 1 - Jobserve New Test Job 1 - Jobserve New Test Job 1 - Jobserve New Test Job 1 - Jobserve NewTest Job 1 - Jobserve New Test Job 1 - Jobserve New Test Job 1 - Jobserve NewTest Job 1 - Jobserve New Test Job 1 - Jobserve New Test Job 1 - Jobserve NewTest Job 1 - Jobserve New Test Job 1 - Jobserve New Test Job 1 - Jobserve NewTest Job 1 - Jobserve New Test Job 1 - Jobserve New Test Job 1 - Jobserve NewTest Job 1 - Jobserve New Test Job 1 - Jobserve New Test Job 1 - Jobserve NewTest Job 1 - Jobserve New Test Job 1 - Jobserve New Test Job 1 - Jobserve NewTest Job 1 - Jobserve New Test Job 1 - Jobserve New Test Job 1 - Jobserve NewTest Job 1 - Jobserve New Test Job 1 - Jobserve New Test Job 1 - Jobserve NewTest Job 1 - Jobserve New Test Job 1 - Jobserve New Test Job 1 - Jobserve New</p><p> </p><p>Test Job 1 - Jobserve New Test Job 1 - Jobserve New Test Job 1 - Jobserve NewTest Job 1 - Jobserve New Test Job 1 - Jobserve New Test Job 1 - Jobserve NewTest Job 1 - Jobserve New Test Job 1 - Jobserve New Test Job 1 - Jobserve NewTest Job 1 - Jobserve New Test Job 1 - Jobserve New Test Job 1 - Jobserve NewTest Job 1 - Jobserve New Test Job 1 - Jobserve New Test Job 1 - Jobserve NewTest Job 1 - Jobserve New Test Job 1 - Jobserve New Test Job 1 - Jobserve NewTest Job 1 - Jobserve New Test Job 1 - Jobserve New Test Job 1 - Jobserve New</p>]]></HtmlSkills>
                         <Location>Sydney</Location>
                         <CountryCode>AUS</CountryCode>
                         <PostZipCode/>
                         <Reference>669/AU1298RA000007</Reference>
                         <StartDate>ASAP</StartDate>
                         <Duration>18 MONTHS</Duration>
                         <Rate>$140/hour</Rate>
                         <Type>C</Type>
                         <URL>http://webdev02:669/job/apply_job_online.cfm?id=474757&amp;from=JobServeNew</URL>
                         <Categories/>     
                         <FastTrack>
                             <ApplyOnline>0</ApplyOnline>
                            <ApplyOnlineEmail></ApplyOnlineEmail>
                            <ApplyOnlineTemplate></ApplyOnlineTemplate>
                         </FastTrack>
                         <Configuration>
                               <AlternativeName/>
                              <VISARequired/>
                              <ReferFriend/>                                 
                              <CustomJobID>669/AU1298RA000007</CustomJobID>
                              <NumberOfReAds>3</NumberOfReAds>
                              <SecondaryMarketID>03</SecondaryMarketID>
                              <TertiaryMarketID>11</TertiaryMarketID>
                         </Configuration>
                         <Consultant>
                             <ConsultantEmail>RECRUITadvantage</ConsultantEmail>
                             <ConsultantFirstName>Administrator</ConsultantFirstName>
                             <ConsultantLastName>te...@gmail.com</ConsultantLastName>
                         </Consultant>
                    </Advert>
               </Adverts>
          </PostAdvert>
     </SOAP:Body>
    </SOAP:Envelope>
</cfsavecontent>


<cfset CFXheader="Content-Type: text/xml; charset=utf-8#Chr(13)##Chr(10)#">
<cfset CFXheader="#CFXheader#Accept-Encoding: *#Chr(13)##Chr(10)#">
<cfset CFXheader="#CFXheader#TE: deflate;q=0#Chr(13)##Chr(10)#">
<cfset CFXheader="#CFXheader#SOAPMethodName: PostAdvert#Chr(13)##Chr(10)#">

<cfx_http5 url="https://xml.jobserve.com" headers="#CFXheader#" body="#Trim(xmlRequest)#" out="result">

<cfdump var="#result#"><br>

<cfoutput>
status = #status#    <br>
<cfif status EQ "ER">
    <h3>Error: #errn#<br>Message: #msg#</h3>
</cfif>
</cfoutput>

为什么SSL URL会将空响应返回给我?

0 个答案:

没有答案