WCF Web服务无法在LoadRunner中运行

时间:2014-05-21 10:24:57

标签: loadrunner

我已按照以下方式创建了自定义请求,我们按照以下方式尝试重播wcf webservice,但收到错误

    enter code here

web_custom_request("ResidentScreening.svc_5", 
        "URL=https://sushil.com/residentscreening/ResidentScreening.svc", 
        "Method=POST", 
        "Resource=0", 
        "RecContentType=text/xml", 
        "Referer=", 
        "Snapshot=t7.inf", 
        "Mode=HTML", 
        "EncType=text/xml;charset=UTF-8", 
        "Body=<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:tem=\"http://tempuri.org/\">\n   <soapenv:Header/>\n   <soapenv:Body>\n     <tem:SubmitRequest>\n         <tem:xml>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&lt;ApplicantScreening xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:noNamespaceSchemaLocation=&quot;ResidentScreening3_0.xsd&quot;&gt;&lt;Request&gt;&lt;PropertyID&gt;&lt;Identification IDType=&quot;Property ID&"
        "quot;&gt;&lt;IDValue&gt;115842&lt;/IDValue&gt;&lt;/Identification&gt;&lt;MarketingName&gt;My Properties&lt;/MarketingName&gt;&lt;/PropertyID&gt;&lt;RequestType&gt;New&lt;/RequestType&gt;&lt;ReportOptions&gt;&lt;ReportName&gt;01&lt;/ReportName&gt;&lt;/ReportOptions&gt;&lt;ReportID/&gt;&lt;OriginatorID&gt;26694&lt;/OriginatorID&gt;&lt;OriginatorTrackingID&gt;reference999&lt;/OriginatorTrackingID&gt;&lt;MarketingSource&gt;Rent.com&lt;/MarketingSource&gt;&lt;UserName&gt;autotest1&lt;/UserName&gt;&lt;"
        "UserPassword&gt;Qctesting3&lt;/UserPassword&gt;&lt;/Request&gt;&lt;LeaseTerms&gt;&lt;MonthlyRent&gt;1400.0000&lt;/MonthlyRent&gt;&lt;LeaseMonths&gt;12&lt;/LeaseMonths&gt;&lt;AffordableLease SubsidyAmount=&quot;200.00&quot;&gt;true&lt;/AffordableLease&gt;&lt;SecurityDeposit&gt;500.00&lt;/SecurityDeposit&gt;&lt;/LeaseTerms&gt;&lt;Applicant&gt;&lt;Other&gt;&lt;CurrentRent&gt;1400.0000&lt;/CurrentRent&gt;&lt;ConsentObtained&gt;YES&lt;/ConsentObtained&gt;&lt;/Other&gt;&lt;Income&gt;&lt;EmploymentStatus"
        "&gt;Employed&lt;/EmploymentStatus&gt;&lt;EmploymentType&gt;Current&lt;/EmploymentType&gt;&lt;EmployerName&gt;Nordstrom&lt;enter code here/EmployerName&gt;&lt;EmploymentGrossIncome&gt;4000.0000&lt;/EmploymentGrossIncome&gt;&lt;EmploymentStartDate&gt;2000-10-15&lt;/EmploymentStartDate&gt;&lt;EmploymentEndDate&gt;2005-01-20&lt;/EmploymentEndDate&gt;&lt;OtherIncomeAmount&gt;1500&lt;/OtherIncomeAmount&gt;&lt;OtherIncomeType&gt;Child Support&lt;/OtherIncomeType&gt;&lt;OtherIncomePeriod&gt;monthly&lt;/OtherIncomePeriod"
        "&gt;&lt;/Income&gt;&lt;AS_Information&gt;&lt;ApplicantIdentifier&gt;t0003544&lt;/ApplicantIdentifier&gt;&lt;ApplicantType&gt;Applicant&lt;/ApplicantType&gt;&lt;GuarantorFor/&gt;&lt;Spouse&gt;t0003545&lt;/Spouse&gt;&lt;MothersMaidenName/&gt;&lt;Birthdate&gt;1965-10-19&lt;/Birthdate&gt;&lt;SocSecNumber&gt;555559999&lt;/SocSecNumber&gt;&lt;DriversLicenseID&gt;027239657&lt;/DriversLicenseID&gt;&lt;DriversLicenseState&gt;GA&lt;/DriversLicenseState&gt;&lt;AddressTerms MoveInDate=&quot;2000-10-10&quot;&"
        "gt;&lt;Address AddressType=&quot;current&quot;&gt;&lt;Address&gt;404 NW Napp St&lt;/Address&gt;&lt;City&gt;De Kalb&lt;/City&gt;&lt;State&gt;TX&lt;/State&gt;&lt;PostalCode&gt;75559&lt;/PostalCode&gt;&lt;CountyName/&gt;&lt;UnparsedAddress&gt;404 NW Napp St&lt;/UnparsedAddress&gt;&lt;Email/&gt;&lt;/Address&gt;&lt;/AddressT**strong text**erms&gt;&lt;AddressTerms MoveInDate=&quot;1989-01-08&quot; MoveOutDate=&quot;2000-10-10&quot;&gt;&lt;Address AddressType=&quot;previous&quot;&gt;&lt;Address&gt;5555 Hollister Avenue"
        "&lt;/Address&gt;&lt;City&gt;Goleta&lt;/City&gt;&lt;State&gt;CA&lt;/State&gt;&lt;PostalCode&gt;93117&lt;/PostalCode&gt;&lt;CountyNameenter code here/&gt;&lt;UnparsedAddress&gt;5555 Hollister Avenue&lt;/UnparsedAddress&gt;&lt;Email/&gt;&lt;/Address&gt;&lt;/AddressTerms&gt;&lt;/AS_Information&gt;&lt;Customers&gt;&lt;Customer&gt;&lt;Identification IDType=&quot;applicant&quot;&gt;&lt;IDValue&gt;t0003544&lt;/IDValue&gt;&lt;/Iden`enter code here`tification&gt;&lt;Name&gt;&lt;FirstName&gt;Stress&lt;/FirstName&gt;&lt;MiddleName/&gt;&lt;"
        "LastName&gt;Test&lt;/LastName&gt;&lt;MaidenName/&gt;&lt;/Name&gt;&lt;Phone PhoneType=&quot;home&quot;&gt;&lt;PhoneNumber&gt;714-982-1000&lt;/PhoneNumber&gt;&lt;/Phone&gt;&lt;Lease&gt;&lt;Identification&gt;&lt;IDValue&gt;t0003545&lt;/IDValue&gt;&lt;/Identification&gt;&lt;ExpectedMoveInDate&gt;2010-12-01&lt;/ExpectedMoveInDate&gt;&lt;ExpectedMoveOutDate&gt;2011-11-30&lt;/ExpectedMoveOutDate&gt;&lt;LeaseFromDate&gt;2010-12-01&lt;/LeaseFromDate&gt;&lt;LeaseToDate&gt;2011-11-30&lt;/LeaseToDate&gt;&lt;"
        "ResponsibleForLease&gt;true&lt;/ResponsibleForLease&gt;&lt;LeaseSignDate&gt;2010-11-15&lt;/LeaseSignDate&gt;&lt;SpecialStatus/&gt;&lt;PaymentAccepted/&gt;&lt;AccountNumber/&gt;&lt;CurrentNumberOccupants Total=&quot;3&quot; Child=&quot;1&quot;&gt;3&lt;/CurrentNumberOccupants&gt;&lt;/Lease&gt;&lt;/Customer&gt;&lt;/Customers&gt;&lt;/Applicant&gt;&lt;Applicant&gt;&lt;Other&gt;&lt;CurrentRent&gt;1400.0000&lt;/CurrentRent&gt;&lt;ConsentObtained&gt;YES&lt;/ConsentObtained&gt;&lt;/Other&gt;&lt;Income&gt;&"
        "lt;EmploymentType&gt;Current&lt;/EmploymentType&gt;&lt;EmployerName&gt;Marsh Law Office&lt;/EmployerName&gt;&lt;EmploymentGrossIncome&gt;5000.0000&lt;/EmploymentGrossIncome&gt;&lt;/Income&gt;&lt;AS_Information&gt;&lt;ApplicantIdentifier&gt;t0003545&lt;/ApplicantIdentifier&gt;&lt;ApplicantType&gt;Applicant&lt;/ApplicantType&gt;&lt;GuarantorFor/&gt;&lt;Spouse&gt;t0003544&lt;/Spouse&gt;&lt;Birthdate&gt;1968-08-14&lt;/Birthdate&gt;&lt;SocSecNumber&gt;444449999&lt;/SocSecNumber&gt;&lt;DriversLicenseID/"
        "&gt;&lt;DriversLicenseState/&gt;&lt;AddressTerms MoveInDate=&quot;2000-10-10&quot;&gt;&lt;Address AddressType=&quot;current&quot;&gt;&lt;Address&gt;404 NW Napp St&lt;/Address&gt;&lt;City&gt;De Kalb&lt;/City&gt;&lt;State&gt;TX&lt;/State&gt;&lt;PostalCode&gt;75559&lt;/PostalCode&gt;&lt;CountyName/&gt;&lt;UnparsedAddress&gt;404 NW Napp St&lt;/UnparsedAddress&gt;&lt;Email/&gt;&lt;/Address&gt;&lt;/AddressTerms&gt;&lt;AddressTerms MoveInDate=&quot;1989-01-08&quot; MoveOutDate=&quot;2000-10-10&quot;&gt;&"
        "lt;Address AddressType=&quot;previous&quot;&gt;&lt;Address&gt;5555 Hollister Avenue&lt;/Address&gt;&lt;City&gt;Goleta&lt;/City&gt;&lt;State&gt;CA&lt;/State&gt;&lt;PostalCode&gt;93117&lt;/PostalCode&gt;&lt;CountyName/&gt;&lt;UnparsedAddress&gt;5555 Hollister Avenue&lt;/UnparsedAddress&gt;&lt;Email/&gt;&lt;/Address&gt;&lt;/AddressTerms&gt;&lt;/AS_Information&gt;&lt;Customers&gt;&lt;Customer&gt;&lt;Identification IDType=&quot;applicant&quot;&gt;&lt;IDValue&gt;t0003545&lt;/IDValue&gt;&lt;/"
        "Identification&gt;&lt;Name&gt;&lt;FirstName&gt;SpouseOf&lt;/FirstName&gt;&lt;MiddleName/&gt;&lt;LastName&gt;Test&lt;/LastName&gt;&lt;MaidenName&gt;Thompson&lt;/MaidenName&gt;&lt;/Name&gt;&lt;Lease&gt;&lt;Identification&gt;&lt;IDValue&gt;t0003545&lt;/IDValue&gt;&lt;/Identification&gt;&lt;ExpectedMoveInDate&gt;2010-12-01&lt;/ExpectedMoveInDate&gt;&lt;ExpectedMoveOutDate&gt;2011-11-30&lt;/ExpectedMoveOutDate&gt;&lt;LeaseFromDate&gt;2010-12-01&lt;/LeaseFromDate&gt;&lt;LeaseToDate&gt;2011-11-30&lt;/"
        "LeaseToDate&gt;&lt;ResponsibleForLease&gt;true&lt;/ResponsibleForLease&gt;&lt;LeaseSignDate&gt;2010-11-15&lt;/LeaseSignDate&gt;&lt;SpecialStatus/&gt;&lt;PaymentAccepted/&gt;&lt;AccountNumber/&gt;&lt;CurrentNumberOccupants Total=&quot;3&quot; Child=&quot;1&quot;&gt;3&lt;/CurrentNumberOccupants&gt;&lt;/Lease&gt;&lt;/Customer&gt;&lt;/Customers&gt;&lt;/Applicant&gt;&lt;CustomRecords&gt;&lt;Record&gt;&lt;Name&gt;User Defined 1&lt;/Name&gt;&lt;Value&gt;ClientRef 1&lt;/Value&gt;&lt;/Record&gt;&lt;Record&"
        "gt;&lt;Name&gt;User Defined 2&lt;/Name&gt;&lt;Value&gt;ClientRef 1&lt;/Value&gt;&lt;/Record&gt;&lt;Record&gt;&lt;Name&gt;Unit Number&lt;/Name&gt;&lt;Value&gt;100&lt;/Value&gt;&lt;/Record&gt;&lt;/CustomRecords&gt;&lt;/ApplicantScreening&gt;</tem:xml>\n      </tem:SubmitRequest>\n   </soapenv:Body>\n</soapenv:Envelope>", 
        LAST);

    lr_message(lr_eval_string("Response XML is \n{response}"));
    return 0;

Action.c(102):错误-26612:HTTP状态代码= 500(内部服务器错误)。请分享是否有可用的工作样本。

1 个答案:

答案 0 :(得分:0)

记录两次,比较。您还需要通过web_add_header()

添加适当的soap标头