Click here to Skip to main content
15,891,906 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
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.

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


Earlier the JAVA service was using CRAFTs with the action names but we have done the changes in the JAVA code base and made it CRAFT less (Without Action names).

The JAVA service is not able to process the .Net request object and giving the aforementioned exception.

Please help !!

"Happy Coding"
Posted
Comments
Ashraff Ali Wahab 19-Aug-13 10:15am    
post sample request.If java is not able to process the request the error should on java side why C# excpeion has been posted?
Prasad Khandekar 19-Aug-13 10:33am    
Have you tried SoAPUI tool to verify whether the Java Web Service is working properly or not? SoapUI Tool cam be downloade from (http://sourceforge.net/projects/soapui/files/soapui/4.5.2/soapui-4.5.2-windows-bin.zip/download)
Jason Gleim 19-Aug-13 14:50pm    
Further to Prasad's comment... if you can successfully call the service with SoapUI, install and run Fiddler and then run your program. Fiddler will catch the service calls on the wire and you can see if there is a problem there. A lot of times I find there is a mismatch in the xmlns declarations for parameters. Java assumes the namespace is the bean that contains the service endpoint while .Net will look for the namespace to be in the application namespace. Neither of them will use w3c namespaces for atomic data types.
Sergey Alexandrovich Kryukov 19-Aug-13 16:20pm    
Not enough information. A code sample could help.
—SA
TapasU 20-Aug-13 0:45am    
Thanks all will give a try and from SOAP UI tool and get back !!

1 solution

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


XML
<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>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900