Solved

Cfinvoke:   Unable to parse WSDL as an XML document.

Posted on 2009-04-09
1
3,031 Views
Last Modified: 2013-12-20
I am atteping to invoke a webservice:
My code i am using to invoke the websrvice is located below.
 I am recieving this error message: Unable to parse WSDL as an XML document.  

This is the instructions:
Access
Web Service
The endpoint (or web location) for the web service is:
http://www.awebsite.net/LSPWebService.asmx
To view the Service Description (WSDL) you may enter:
http://www.awebservice.net/LSPWebService.asmx?wsdl
The TargetNamespace for the web service is the same as its URL.
Web Page
The endpoint (or web location) for the web page is:
http://www.awebservice.net/frmLSP.aspx
GetMethod ()
GetMethod() method accepts a an object of type QuoteRequest and returns an object of type
QuoteResponse which holds all returned policy quotes available for the set of criteria provided in the
request object QuoteRequest.
QuoteRequest
This object is passed to the method GetMethod() as a single parameter. This request object holds
a set of demographic information.
QuoteRequest Data Members
Data Member Type Description
RequestTransactionID String Passed in the request object and return as is
in the response object.
RequestState String State where the policy is purchased.
RequestClientAge String Age of the primary applicant
RequestClientTobacco boolean True/False primary use of tobacco
RequestFamilyStatus string Indicating the family status of the primary
applicant:
" Single
" Spouse Only
" Spouse And Children
" Children Only
RequestSpouseAge String Age of the primarys spouse
RequestSpouseTobacco String True/False primarys spouse use of tobacco
RequestModal String Payment frequency:
" Annual
" Biweekly
" Monthly
" Quarterly
" Semiannual
" Semimonthly
" Weekly
Invalid Demographics
Error Message
If Valid returns false then you have an error.
Possible errors:
Request object must have an age range from 18-64 for both applicant and spouse.
Request object must have all properties populated.



QuoteResponse
This object is returned by the GetMethod() method and contains a list of available quotes for Money
Purchases and Face Amounts rated.
QuoreResponse Data Members
Data Member Type Description
Quotes Array-List Array list
ChildrenFace String Face amount for the Children (if exist)
SpouseFace String Face amount for the spouse (if exists)
QRequest Object
The QuoteRequest object.
Valid Boolean True/False when false then error message exists
BenefitDescription String Description of policy benefits
ErrorMsg String Contains the error message (if any).
Quotes Data Members
Data Member Type Description
FaceAmountQuote Array-List
MoneyPurchaseQuote Array-List
FaceAmountQuote Data Members
Data Member Type Description
Quote Array-List
MoneyPurchaseQuote Data Members
Data Member Type Description
Quote Array-List
Quote Data Members
Data Member Type Description
QuoteValues Array-List
Colorado Bankers Life LifestyleProtector Service Software API Document
CBL_-_API.doc Page 4
QuoteValues Data Members
Data Member Type Description
FaceValue String Value of face amount or Money Purchase
ClientPremium String Premium value for individual only
FamilyPremium String Premium value for family


How would i set this up to get a responce back using coldfusion?

<!---   This is how i call the webservice  --->

<cfinvoke 

webservice="http://www.awebsite.net/LSPWebService.asmx" method="Getmethod" returnvariable="aString">

<cfinvokeargument name="RequestTransactionID " value="111" />

<cfinvokeargument name="RequestState" value="AL" />

<cfinvokeargument name="RequestClientAge" value="40" />

<cfinvokeargument name="RequestClientTobacco"  value="false" />

<cfinvokeargument name="RequestSpouseAge" value="40" />

<cfinvokeargument name="RequestSpouseTobacco" value="false"  />

<cfinvokeargument name="RequestModal" value="Monthly" />

<cfinvokeargument name="RequestFamilyStatus" value="SpouseOnly" />

<cfoutput>#aString#</cfoutput>

Open in new window

0
Comment
Question by:LeadCo
1 Comment
 

Accepted Solution

by:
LeadCo earned 0 total points
ID: 24114192
I have figured out the way to call the webservice and return the response via cfhttp

Here is the code in case you need to consume a webservice with cfhttp.

<cfset strURL = "#webserviceURL#" />

<cfsavecontent variable="strXML">
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <GetQuotes xmlns="http://www.awebsite.net">
      <_quoteRequest>
        <RequestTransactionID>1411</RequestTransactionID>
        <RequestState>AL</RequestState>
        <RequestClientAge>38</RequestClientAge>
        <RequestClientTobacco>false</RequestClientTobacco>
        <RequestSpouseAge>38</RequestSpouseAge>
        <RequestSpouseTobacco>false</RequestSpouseTobacco>
        <RequestModal>Monthly</RequestModal>
        <RequestFamilyStatus>SpouseOnly</RequestFamilyStatus>
      </_quoteRequest>
    </GetQuotes>
  </soap12:Body>
</soap12:Envelope>
</cfsavecontent>


<cfhttp
url="#strURL#"
method="post"
useragent="#CGI.http_user_agent#"
result="objGet"
>

<cfhttpparam
type="XML"
value="#strXML.Trim()#"
/>
 

</cfhttp>

<cfoutput>#XMLFORMAT(objGet.FileContent)#<br /></cfoutput><!------>
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
IIS url rewrite rule for web application 3 52
Text Transformation using ActionScript 3 5 116
Web server settings related to keepalive 1 110
Annoying "thing" blocks my view 4 82
Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
The purpose of this video is to demonstrate how to automatically show related posts at the bottom of a blog post in WordPress. This will be demonstrated using a Windows 8 PC. Plugin “Yet Another Related Posts Plugin” will be used. Go to your…
The purpose of this video is to demonstrate how to set up basic WordPress SEO. This will be demonstrated using a Windows 8 PC. The plugin used will be WordPress SEO by Yoast. Go to your WordPress login page. This will look like the following: myw…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now