Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Invoking a webservice - Error - Unable to parse WSDL as an XML document.

Explorer ,
Feb 15, 2010 Feb 15, 2010

Hello,

When I am invovking the webservice with the following code. I am getting the following error.

Unable to  parse WSDL as an XML document.

Parsing error: Fatal Error:  URI=null Line=168: The element type "link" must be terminated by the matching  end-tag "".
It is recommended that you use a web browser to retrieve  and examine the requested WSDL document to ensure it is correct.

Code that I have used is :

<CFINVOKE component="userinfo" METHOD="GetuserInfo" RETURNVARIABLE="result_info" >
    <cfinvokeargument name="EMP" value="123456"/>
</cfinvoke>
<cfdump var="#result_info#">

<CFINVOKE webservice="http://www.test.com/userinformation.cfc?wsdl" METHOD="GetVehInfo" RETURNVARIABLE="result_info" >
    <cfinvokeargument name="EMP" value="123456"/>
</cfinvoke>
<cfdump var="#result_info#">

Can some one provide me a solution?

Thanks in advance,

Satheesh.

7.2K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 15, 2010 Feb 15, 2010

It is recommended that you use a web browser to retrieve  and examine the requested WSDL document to ensure it is correct.

Did you actually do what it suggests?

It sounds to me like your we service URL is trying to render an HTML page rather than outputing WSDL...

--

Adam

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 16, 2010 Feb 16, 2010

We were able to call the component and get the output. While changing the same component as webservice by adding access="remote", we are able to navigate to the WSDL page. But, when we try to call the same, we receive the error.

Thanks,

Satheesh.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 16, 2010 Feb 16, 2010

You can browse to that URL from the CF server (ie: not from the browser on your workstation) and see the WSDL on the screen?

What happens if you <cfhttp> that URL instead of calling it as a web service?  What's in the filecontent?

--

Adam

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Feb 23, 2010 Feb 23, 2010

Are you referencing your component in coldfusion by "mycomponent.cfc?wsdl"?  You need to make sure you include the "?wsdl" at the end of the URL to your component in order for the CF server to return the WSDL XML file that your calling application needs to set up the webservice call.  What Adam was saying is that loading that URL:

http://www.mysite.com/component_directory/mycomponent.cfc?wsdl

in a browser from your CF server will display the WSDL code that you can then verify visually that it a) does not contain any strange HTML code (e.g. error messages, etc) and  b) is valid XML.

Also, remember any time you make a change to a web service interface that your CF code is referencing you need to go into CF administrator and refresh the web service entry.

Hope that helps!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 04, 2010 Mar 04, 2010

We too faced the same issue.

But it worked while accessing a webservice using cfhttp .

We are facing another issue while accessing a java webservice using coldfusion (i.e., cfhttp) .

Coldfusion Server is in Windows Environment (i.e., consumer )

Java /J2eee code is hosted IBM application server in Unix Envionment (i..e., producer /service provider)

We are accessing the webservice url using the colfusion cfhttp method as below  with the WSL credential and soap request.

<cfhttp url="<<Webservicepath>>" method="post"  >
    <cfhttpparam type="header" name="content-type" value="text/xml">
    <cfhttpparam type="header" name="SOAPAction" value="<<SOAPACTIONPATH>>">
    <cfhttpparam type="header" name="content-length" value="#len(myxmlsoaprequest)#">
    <cfhttpparam type="header" name="charset" value="utf-8">
    <cfhttpparam type="cookie" name="WSL-credential" value="<<Cookie>>">
       <cfhttpparam type="xml" name="message" value="#myxmlsoaprequest#">
   </cfhttp>

We get cfhttp.filecontent as empty and cfhttp.errordetail as  empty as like below.

CharsetISO-8859-1
ErrorDetail[empty string]
Filecontent[empty string]
HeaderHTTP/1.1 200 OK Connection: close Expires: Thu, 01 Jan 1970 00:00:00 GMT Content-Language: en-US Date: Thu, 04 Mar 2010 12:32:16 GMT Server: IBM_HTTP_Server/6.1.0.25 Apache/2.0.47 Content-Length: 0 Pragma: no-cache Cache-Control: no-cache Content-Type: text/html; charset=ISO-8859-1
Mimetypetext/html
Responseheader
struct
Cache-Controlno-cache
Connectionclose
Content-Languageen-US
Content-Length0
Content-Typetext/html; charset=ISO-8859-1
DateThu, 04 Mar 2010 12:32:16 GMT
ExpiresThu, 01 Jan 1970 00:00:00 GMT
ExplanationOK
Http_VersionHTTP/1.1
Pragmano-cache
ServerIBM_HTTP_Server/6.1.0.25 Apache/2.0.47
Status_Code200
Statuscode200 OK
TextYES

while checking further , we found that we have received the below error log information in the service provider server error log (UNiX).

DCSV1036W: DCS Stack DefaultCoreGroup at Member : An unusual connectivity state occured with member

details: alarm(): Closing the connection because members did not manage to connect.

Can you please advise

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Mar 08, 2010 Mar 08, 2010

Further, we tried with trace method of "cfhttp" with the same destination. We received permission denied message as below in the filecontent.
But this error was not visible, while we tried with post method of "cfhttp"
Filecontent 403 Forbidden You don't have permission to access / on this server. IBM_HTTP_Server/6.1.0.25 Apache/2.0.47 Server at wwwdev.test.test.com Port 80

Can you please help us

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 19, 2010 Apr 19, 2010

I have the same error when accessing another site using cfinvoke. The WSDL at the other site has been checked out, and looks good in a desktop browser. When I try to server-connect using cfhttp, I get a connection error - however, I can cfhttp to other public websites.

I have also created my own test web-service on the CF server and used CF to access that successfully; but the server I am trying to access is not CF

This means there is something about the WSDL page that my CF8 doesn't like, or that rejects the CF calls - but what can that be? Is it a setting on the CFserver, or IIS? Has anyone encountered this problem and resolved it? I would hate to have to re-write my calling program in some other schema. Thanks.

- keyman

.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 19, 2010 Apr 19, 2010
LATEST

It could be that the webservice is expecting a complex value or XML, whereas the value you're passing(EMP) is a simple value.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources