.Net服务调用Java服务 [英] .Net Service call to Java service
本文介绍了.Net服务调用Java服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我正从ASMX调用Java服务。但是,我从.Net代码库中的Java调用中获得以下异常。
Hi All,
I am making call to a Java service from my ASMX. However, I am getting the following exception from the Java call in my .Net code base.
System.Web.Services.Protocols.SoapException : System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Exception: W#-97 at Service.GenerateRatingReport(CAT_SnapshotDetails objSnapshotDetails, String strDRMLanguage, String strUserID, String strDataSource) --- End of inner exception stack trace ---
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at TestReportingServices.CATWebservice.Service.GenerateRatingReport(CAT_SnapshotDetails objSnapshotDetails, String strDRMLanguage, String strUserID, String strDataSource) in Reference.cs: line 2812 at TestReportingServices.ReportingServiceTestHappyPaths.GenerateRatingReportTest() in ReportingServiceTestHappyPaths.cs: line 46
早期的JAVA服务我正在使用带有动作名称的CRAFT,但我们已经在JAVA代码库中进行了更改,并使其更少CRAFT(没有Action名称)。
JAVA服务不是能够处理.Net请求对象并给出上述异常。
请帮助!!
快乐编码
推荐答案
大家好,
我尝试使用SOAPUI工具生成请求。但我得到以下错误。
HTTP / 1.1 400错误请求
日期:星期二,2013年8月20日05:41 :30 GMT
服务器:Microsoft-IIS / 6.0
X-Powered-By:ASP.NET
缓存控制:私有
内容长度:0
以下样品请求
Hi All,
I tried SOAPUI tool to generate the request. But I am getting Following Error.
HTTP/1.1 400 Bad Request
Date: Tue, 20 Aug 2013 05:41:30 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
Cache-Control: private
Content-Length: 0
Sample Request below
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/">
<soapenv:Header/>
<soapenv:Body>
<tem:GenerateRatingReport>
<!--Optional:-->
<tem:objSnapshotDetails>
<!--Optional:-->
<tem:arSelectedVerifierList>
<!--Zero or more repetitions:-->
<tem:anyType>?</tem:anyType>
</tem:arSelectedVerifierList>
<!--Optional:-->
<tem:arSelectedVerifierSOEIDList>
<!--Zero or more repetitions:-->
<tem:anyType>?</tem:anyType>
</tem:arSelectedVerifierSOEIDList>
<!--Optional:-->
<tem:OblogorID>?</tem:OblogorID>
<!--Optional:-->
<tem:FinancialBasedRating/>
<!--Optional:-->
<tem:ProductDerivedBorrowerRating/>
<!--Optional:-->
<tem:DiscretionaryAdjustmentsReason/>
<!--Optional:-->
<tem:reasonForAdjustmentORR/>
<!--Optional:-->
<tem:SSS/>
<!--Optional:-->
<tem:AvgSSS/>
<!--Optional:-->
<tem:reasonForAdjustmentFRR/>
<!--Optional:-->
<tem:FinalORRCPB/>
<!--Optional:-->
<tem:DiscretionaryAdjustmentsValue/>
<!--Optional:-->
<tem:ORREXPLANATIONOFADJUSTMENT/>
<!--Optional:-->
<tem:MSBFEXPLANATIONOFADJUSTMENT/>
<!--Optional:-->
<tem:RREEXPLANATIONOFADJUSTMENT/>
<!--Optional:-->
<tem:CREEXPLANATIONOFADJUSTMENT/>
<!--Optional:-->
<tem:UNSECUREDEXPLANATIONOFADJUSTMENT/>
<!--Optional:-->
<tem:BestofProductBasedandFinancialBasedRatings/>
<!--Optional:-->
<tem:IsRDAP/>
<!--Optional:-->
<tem:IsOntheFlyReport>"Y"</tem:IsOntheFlyReport>
<!--Optional:-->
<tem:SnapshotID>"-2551"</tem:SnapshotID>
<!--Optional:-->
<tem:SnapShotName/>
<!--Optional:-->
<tem:SnapshotComments/>
<!--Optional:-->
<tem:SnapshotStatus/>
<!--Optional:-->
<tem:Model_Code/>
<!--Optional:-->
<tem:GenerationNum/>
<!--Optional:-->
<tem:OFR/>
<!--Optional:-->
<tem:NumORR/>
<!--Optional:-->
<tem:AlphaORR/>
<!--Optional:-->
<tem:ProjectionScenario/>
<!--Optional:-->
<tem:GenerateSnapshotID/>
<!--Optional:-->
<tem:ConfidentialSnapshot/>
<!--Optional:-->
<tem:NumPQR/>
<!--Optional:-->
<tem:AlphaPQR/>
<!--Optional:-->
<tem:ProbDefault/>
<!--Optional:-->
<tem:Is_Verified/>
<!--Optional:-->
<tem:GFCID>"1000523328"</tem:GFCID>
<!--Optional:-->
<tem:GFPID>"1000523328"</tem:GFPID>
<!--Optional:-->
<tem:CountryCode/>
<!--Optional:-->
<tem:Ticker/>
<!--Optional:-->
<tem:SIC_Code/>
<!--Optional:-->
<tem:NAICS_Code/>
<tem:DateOfInc>2007-07-13T20:06:00.000-05:00</tem:DateOfInc>
<!--Optional:-->
<tem:DRMBaselineStatus/>
<!--Optional:-->
<tem:TemplateId/>
<!--Optional:-->
<tem:CurrencyName/>
<!--Optional:-->
<tem:UnitType/>
<!--Optional:-->
<tem:CompanyId/>
<!--Optional:-->
<tem:SpreadVersion/>
<!--Optional:-->
<tem:DocID/>
<!--Optional:-->
<tem:SnapshotByte>cid:516544284436</tem:SnapshotByte>
<!--Optional:-->
<tem:DateofCreation>?</tem:DateofCreation>
<!--Optional:-->
<tem:Author>?</tem:Author>
<!--Optional:-->
<tem:VerifiedBy/>
<!--Optional:-->
<tem:BaselinedBy/>
<!--Optional:-->
<tem:VerifiedOn/>
<!--Optional:-->
<tem:BaselinedOn/>
<!--Optional:-->
<tem:ActivatedBy/>
<!--Optional:-->
<tem:ActivationOn/>
<!--Optional:-->
<tem:FileName/>
<!--Optional:-->
<tem:ActiveBaseline/>
<!--Optional:-->
<tem:UpdateFlag/>
<!--Optional:-->
<tem:LoggedInUserId/>
<tem:VersionNumber>0</tem:VersionNumber>
<tem:AmendmentNumber>0</tem:AmendmentNumber>
<!--Optional:-->
<tem:FiscalYearEnd/>
<!--Optional:-->
<tem:SecondaryCurrency/>
<!--Optional:-->
<tem:AdjustedORR/>
<!--Optional:-->
<tem:QualResult/>
<!--Optional:-->
<tem:Consolidated/>
<!--Optional:-->
<tem:Check_Ratings/>
<!--Optional:-->
<tem:OLR/>
<!--Optional:-->
<tem:FRR/>
<!--Optional:-->
<tem:OLR_FORR/>
<!--Optional:-->
<tem:SourceBaseline/>
<tem:SourceRecId>0</tem:SourceRecId>
<!--Optional:-->
<tem:SourceModel/>
<!--Optional:-->
<tem:CatActivationStatus/>
<!--Optional:-->
<tem:MajorVersion/>
<!--Optional:-->
<tem:MinorVersion/>
<!--Optional:-->
<tem:OperatingCountryCode/>
<!--Optional:-->
<tem:NUMBER_OF_CLIENT/>
</tem:objSnapshotDetails>
<!--Optional:-->
<tem:strDRMLanguage>"1"</tem:strDRMLanguage>
<!--Optional:-->
<tem:strUserID>"tu04173"</tem:strUserID>
<!--Optional:-->
<tem:strDataSource>"1"</tem:strDataSource>
</tem:GenerateRatingReport>
</soapenv:Body>
</soapenv:Envelope>
这篇关于.Net服务调用Java服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文