Skip to main content
August 25, 2009
Question

Webservice on server startup

  • August 25, 2009
  • 2 replies
  • 1572 views

I have a webservice that works 100% once running.

The problem is that when the server has been restarted, you need to manually go and do a "Validate" action on the webservice before it will run. Any idea how to resolve this?

Thank you

Andre

This topic has been closed for replies.

2 replies

Inspiring
August 28, 2009

What is the manifestation if one calls this web service before validating it?  Is there an error message?

--

Adam

August 28, 2009

I have two servers, a gateway server that is the "source/owner" of the web service. Ip 192.168.159.129.

Then a client that consumes the ws - ip 192.168.159.128.

The server show now entries in the error log.

The error on the client machine is :

08/28 06:14:15 Error [jrpp-2] - coldfusion.xml.rpc.XmlRpcServiceImpl$CantFindWSDLException: Unable to read WSDL from URL: http://192.168.159.129/ws/WPSVPWebService.cfc?wsdl

This is directly after both servers has started up. This will be the first ws call made.

I the refresh the ws on the server machine - still the same error.

08/28 06:19:06 Error [jrpp-0] - coldfusion.xml.rpc.XmlRpcServiceImpl$CantFindWSDLException: Unable to read WSDL from URL: http://192.168.159.129/ws/WPSVPWebService.cfc?wsdl.


I then refresh the ws definition on the client machine and VOILA - working.

The ws is defined as follows on the client cf server:

Name:WPSVPWebService

URL: http://192.168.159.129/ws/WPSVPWebService.cfc?wsdl

Username: xxxxxx

Password: xxxxxxx

The problem is that I'm now starting up a cluster of two CentOS servers running a minimum of two Coldfusion servers each which can increase as and when the load requires another instance. If you forget to fresh the ws, it will cause majjor problems in the application.

Any pointers will be greatly apreciated...

Andre

August 28, 2009

Ok - build a test.cfml module that I call with the following code:

<cfoutput>
Testing ws call

<cfset cardnumber="00000230i">
<cfinvoke webservice="http://192.168.159.129/ws/WPSVPWebService.cfc?wsdl"
        method="verifyPin"
        username="xxxx"
        password="xxxx"
        returnvariable="stResponse">

        <cfinvokeargument name="cardnumber" value="#cardnumber#" />
        <cfinvokeargument name="pin" value="5353i" />

</cfinvoke>

<cfdump var="#stResponse#">

</cfoutput>

This fails after a time and fails to "refresh" the webservice.

Am I missing something?

Tks

Andre

BKBK
Community Expert
Community Expert
August 25, 2009

I suspect the web service uses application or session variables or, quite unlikely but possible, server variables. If so, then it would need a kick-start whenever the server restarts. It is in fact also what you would wish.

August 27, 2009

The question that begs answering is:

How do I kick-start this when the server/after the server starts. I have to get this automated as the webservice is a gateway to a financial system causing havoc if somebody forgets to refresh the WS manually.

Tks

Andre

BKBK
Community Expert
Community Expert
August 27, 2009

To kick-start, use a simple Coldfusion test page to call the web service.