Thursday, March 22, 2012

Web service returns blank page!

Hi there...apology...not sure if I am posting to the right forum!

I have been trying to consume a web service(third party)... which should return data about an applicant(credit history)...I also have a form that send parameters(name address and the likes) These are accepted(apparently) and I do not get any errors but I do not get any data either!! could someone help??

here is the code I am using:

1<%@dotnet.itags.org. Page Language="VB"%>2<script runat="server">3Protected Sub submit_Click(ByVal senderAs Object,ByVal eAs System.EventArgs)4Dim apiProxyAs creditAPI.creditAPI =New creditAPI.creditAPI()5Dim apiCRAs creditAPI.CT_apicr =New creditAPI.CT_apicr67 apiProxy.Url ="Url"89' Create a new credentials object and attach it to the proxy object.10Dim apiCredentialsAs creditAPI.CT_credentials =New creditAPI.CT_credentials11 apiCredentials.company ="company"12 apiCredentials.username ="user"13 apiCredentials.password ="pswd"14 apiProxy.credentials = apiCredentials1516' Create a new action object and attach it to the proxy object17 apiProxy.action =New creditAPI.ST_action18 apiProxy.action.Text =New String() {"urn:credit.co.uk/api5/actions/5305"}1920' Create a new credit request object and attach it to the apicr object.21Dim apiCreditRequestAs creditAPI.CT_apicreditrequest =New creditAPI.CT_apicreditrequest22 apiCreditRequest.purpose = creditAPI.ST_searchpurpose.CA23 apiCreditRequest.score = 124 apiCreditRequest.scoreSpecified =True25 apiCreditRequest.transient = 026 apiCreditRequest.transientSpecified =True27 apiCR.creditrequest = apiCreditRequest2829' Create a new request applicant object and attach it to the credit request object.30Dim apiRequestApplicantAs creditAPI.CT_apirequestapplicant =New creditAPI.CT_apirequestapplicant31'apiRequestApplicant.dob = Me.txtDoB.Text32 apiRequestApplicant.dobSpecified =False33'apiRequestApplicant.hho = Convert.ToByte(Me.chkHHO.Checked)34 apiRequestApplicant.hhoSpecified =True35'apiRequestApplicant.tpoptout = Convert.ToByte(Me.chkTPOptout.Checked)36 apiRequestApplicant.tpoptoutSpecified =True3738' Create a new name object and attach it to the request applicant object.39Dim apiNameAs creditAPI.CT_name =New creditAPI.CT_name40 apiName.title =Me.txtTitle.Text41 apiName.forename =Me.txtForename.Text42 apiName.surname =Me.txtSurname.Text43 apiRequestApplicant.name =New creditAPI.CT_name() {apiName}4445' Create a new input address object and attach it to the request applicant object.46Dim apiInputAddressAs creditAPI.CT_inputaddress =New creditAPI.CT_inputaddress47 apiInputAddress.premiseno =Me.txtPremiseNum.Text48 apiInputAddress.postcode =Me.txtPostcode.Text49 apiRequestApplicant.address =New creditAPI.CT_inputaddress() {apiInputAddress}50 apiCreditRequest.applicant =New creditAPI.CT_apirequestapplicant() {apiRequestApplicant}51Dim inpAs New creditAPI.CT_apicr52 apiProxy.Job5305(apiCR)53End Sub5455 </script>

Thanks,

Critical5

I suggest you to contact your web service provider to find out what the problem is, because "a blank page" usually indicates that the service cannot process request due to an exception, but of course the provider does not want you to see the stack trace due to obvious security reasons.

Also, you can refer to the api documentation and examples, which I believe are provided with the api.

0 comments:

Post a Comment