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

cfinvoke Web Services issue

Explorer ,
Aug 19, 2018 Aug 19, 2018

Copy link to clipboard

Copied

One of our vendors seems to have changed something on their end and my webservices call has broken.  I can't seem to convince the vendor the problem is on their end.  Am I wrong?

At this point I'm just trying just a single line:

<cfinvoke webservice="https://www.h2hdigitalrx.com/services/v4/PartnerIntegrationService?wsdl" method="test">

and it throws this error about white spaces being required:

Cannot generate stub objects for web service invocation.

Name: https://www.h2hdigitalrx.com/services/v4/PartnerIntegrationService?wsdl. WSDL: https://www.h2hdigitalrx.com/services/v4/PartnerIntegrationService?wsdl. javax.wsdl.WSDLException: WSDLException (at /definitions/types/xsd:schema[1]): faultCode=PARSER_ERROR: Problem parsing 'http://www.h2hdigitalrx.com:80/services/v4/PartnerIntegrationService?xsd=1'.: org.xml.sax.SAXParseException: White spaces are required between publicId and systemId. It is recommended that you use a web browser to retrieve and examine the requested WSDL document to ensure it is correct. If the requested WSDL document cannot be retrieved or is dynamically generated, it is likely that the target web service has programming errors.

CF11 latest patches, Windows server 2012. Help?

Views

855

Translate

Translate

Report

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

correct answers 1 Correct answer

Explorer , Aug 20, 2018 Aug 20, 2018

I am back up and running.  Pete was correct, the problem was with their schema.

I went with solution #3 above, copied their WSDL locally, fixed their http links to https, and everything magically works again.  Thank you Pete!!!  I owe you at least 3, perhaps 4 drinks. 

Votes

Translate

Translate
Explorer ,
Aug 19, 2018 Aug 19, 2018

Copy link to clipboard

Copied

Votes

Translate

Translate

Report

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 ,
Aug 19, 2018 Aug 19, 2018

Copy link to clipboard

Copied

I have tested connecting to other webservices/wsdl's and they all work fine.  This is specific to this one vendor.

Votes

Translate

Translate

Report

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 ,
Aug 19, 2018 Aug 19, 2018

Copy link to clipboard

Copied

I have also tried the code

<cfinvoke webservice="https://www.h2hdigitalrx.com/services/v4/PartnerIntegrationService?wsdl" method="test">

From a second CF server - same problem/error. 

Votes

Translate

Translate

Report

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 ,
Aug 20, 2018 Aug 20, 2018

Copy link to clipboard

Copied

One thought is that it may be related to the SSLv3 issues with CF11 mentioned here:

https://www.coldfusionmuse.com/index.cfm/2014/12/8/colfusion-jvm-versions-sslv3-tls

I've added -Dhttps.protocols=TLSv1.2,TLSv1.1,TLSv1 to my JVM arguments in the CF Administrator, but it doesn't seem to have any effect. 

Votes

Translate

Translate

Report

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 ,
Aug 20, 2018 Aug 20, 2018

Copy link to clipboard

Copied

Scratch that, they have verified I am connecting via TLS1.2.  Back to the drawing board.

I'm still certain this is something misconfigured with their XML.  Is there anyone that can connect to that webservice without an error, using:

<cfinvoke webservice="https://www.h2hdigitalrx.com/services/v4/PartnerIntegrationService?wsdl" method="test">

Votes

Translate

Translate

Report

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 ,
Aug 20, 2018 Aug 20, 2018

Copy link to clipboard

Copied

So the error, whittled down, is this (I think)

org.xml.sax.SAXParseException; systemId: http://www.h2hdigitalrx.com:80/services/v4/PartnerIntegrationService?xsd=1; lineNumber: 1; columnNumber: 50; White spaces are required between publicId and systemId.

Could it be a problem with one of the URL's listed?

<xs:schema xmlns:tns="http://services.business.drx.ys.com/" xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.0" targetNamespace="http://services.business.drx.ys.com/"

Votes

Translate

Translate

Report

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 ,
Aug 20, 2018 Aug 20, 2018

Copy link to clipboard

Copied

Specifically looking for anyone on CF 2018 who can test this line of code for me - would REALLY help!

<cfinvoke webservice="https://www.h2hdigitalrx.com/services/v4/PartnerIntegrationService?wsdl" method="test">

I'm wondering if an upgrade to 2018 would fix the issue, or if the error is still there. 

Votes

Translate

Translate

Report

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 ,
Aug 20, 2018 Aug 20, 2018

Copy link to clipboard

Copied

I received a reply from Pete Freitag:

================================

I took a quick look at it... here what I think the problem is... In the WSDL it has this link to load a schema: http://www.h2hdigitalrx.com:80/services/v4/PartnerIntegrationService?xsd=1

BUT that URL is getting redirected to https, I don't think CF is following the redirect, so it is trying to parse the response of the HTTP request, which is:


<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>301 Moved Permanently</title> </head><body> <h1>Moved Permanently</h1> <p>The document has moved <a href="https://www.h2hdigitalrx.com/services/v4/PartnerIntegrationService?xsd=1">here</a>.</p> <hr> <address>Apache/2.4.18 (Ubuntu) Server at www.h2hdigitalrx.com Port 80</address> </body></html>

And ofcourse the Location header is set to redirect the HTTP client to https://www.h2hdigitalrx.com/services/v4/PartnerIntegrationService?xsd=1

So there are probably 4 ways to fix this:

1) Get the service provide to put a HTTPS url in there

2) Report a bug to Adobe (this will take months to fix)

3) Make a local WSDL url that fixes the problem (rewrite http to https)

4) Rewrite your web service calls to just use cfhttp and xml parse

I'd start with #1 since it probably would cause a problem on many web service clients, I'm not sure that Adobe would fix this - they would probably defer to Apache Axis, there might be a reason to not follow redirects.

Votes

Translate

Translate

Report

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 ,
Aug 20, 2018 Aug 20, 2018

Copy link to clipboard

Copied

LATEST

I am back up and running.  Pete was correct, the problem was with their schema.

I went with solution #3 above, copied their WSDL locally, fixed their http links to https, and everything magically works again.  Thank you Pete!!!  I owe you at least 3, perhaps 4 drinks. 

Votes

Translate

Translate

Report

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
Documentation