ColdFusion generated wsdl showing axis prefix namespace
Copy link to clipboard
Copied
Hi,
I have re-installed the ColdFusion 2016 Development versionwith update 16.
My all existing Web Service (WSDL) format is changed.
Before :
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mob="http://mobservice.itcssap">
<soapenv:Header/>
<soapenv:Body>
<mob:TOKENRequest>
<mob:valUserName>?</mob:valUserName>
<mob:valPassword>?</mob:valPassword>
<mob:valDevUniqID>?</mob:valDevUniqID>
<mob:valDevName>?</mob:valDevName>
<mob:valDevPushNotif>?</mob:valDevPushNotif>
</mob:TOKENRequest>
</soapenv:Body>
</soapenv:Envelope>
After Re-Install :
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:axis="http://ws.apache.org/axis2">
<soap:Header/>
<soap:Body>
<axis:TOKENRequest>
<!--Optional:-->
<axis:valUserName>?</axis:valUserName>
<!--Optional:-->
<axis:valPassword>?</axis:valPassword>
<!--Optional:-->
<axis:valDevUniqID>?</axis:valDevUniqID>
<!--Optional:-->
<axis:valDevName>?</axis:valDevName>
<!--Optional:-->
<axis:valDevPushNotif>?</axis:valDevPushNotif>
</axis:TOKENRequest>
</soap:Body>
</soap:Envelope>
Can anybody help me.
Thanks
Copy link to clipboard
Copied
What you've shown looks to me like a message in a SOAP request, rather than part of a WSDL. If it is, then that's not necessarily a problem. You are free to define the namespaces (xmlns) yourself when you make a SOAP request. So, in your web-service requests, change the Envelope's namespaces by replacing
xmlns:soap="http://www.w3.org/2003/05/soap-envelope" with xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
and
xmlns:axis="http://ws.apache.org/axis2" with xmlns:mob="http://mobservice.itcssap"
Then, in the body, replace soap: with soapenv: and axis: with mob:.
Copy link to clipboard
Copied
Thanks for your reply.
The Problem is this Service (WSDL) consumed by thirparty and multiple place. We cant change the SOAP request.
I am not sure, its very strange, why suddenly its changed to "axis" every were in SOAP request.
Is there any ColdFusion configuration issue ? Please help me if you have any idea.
Thanks.
Copy link to clipboard
Copied
I am now confused. How do you generate the WSDL? How did you get the before and after format you've shown above?
Is there any ColdFusion configuration issue ? Please help me if you have any idea.
By sne_paul
Yes. You could configure any or all of the following:
- Delete all the cached class files from \wwwroot\WEB-INF\cfclasses\ and \wwwroot\WEB-INF\cfc-skeletons\. That will force ColdFusion to generate new classes.
- Open the ColdFusion Administrator and go to the page Data & Services > Web Services. Experiment by changing the Web Service Version (from 1 to 2 or from 2 to 1).
- ( still in the page Data & Services > Web Services ) If your web service is registered there, then press the Refresh button.
Copy link to clipboard
Copied
Sorry for Confusion.
I have generate WSDL by execute cfc file with ?wsdl param. Example if my cfc file name is test.cfc, i am generation wsdl by running script by ../test.cfc?wsdl
This same test.cfc file generation from CF2016 Production its coming proper like below :
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mob="http://mobservice.itcssap">
<soapenv:Header/>
<soapenv:Body>
<mob:TOKENRequest>
<mob:valUserName>?</mob:valUserName>
<mob:valPassword>?</mob:valPassword>
<mob:valDevUniqID>?</mob:valDevUniqID>
<mob:valDevName>?</mob:valDevName>
<mob:valDevPushNotif>?</mob:valDevPushNotif>
</mob:TOKENRequest>
</soapenv:Body>
</soapenv:Envelope>
But same CFC when I running from freshly installed CF2016 Development version its generation like below :
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:axis="http://ws.apache.org/axis2">
<soap:Header/>
<soap:Body>
<axis:TOKENRequest>
<!--Optional:-->
<axis:valUserName>?</axis:valUserName>
<!--Optional:-->
<axis:valPassword>?</axis:valPassword>
<!--Optional:-->
<axis:valDevUniqID>?</axis:valDevUniqID>
<!--Optional:-->
<axis:valDevName>?</axis:valDevName>
<!--Optional:-->
<axis:valDevPushNotif>?</axis:valDevPushNotif>
</axis:TOKENRequest>
</soap:Body>
</soap:Envelope>
Thanks
Copy link to clipboard
Copied
You see, that is exactly what confuses me. Neither of these 2 XML documents looks to me like a WSDL or even part of a WSDL.
For example, a WSDL begins with <wsdl> and ends with </wsdl>, and doesn't contain an envelope.
It is worth saying again: the 2 XMLs look typically like the kind of XML message that you will send in a SOAP request.
Copy link to clipboard
Copied
That debate aside, sne_paul, did you try the change of the "web service version" setting in the cf admin, as bkbk noted? That does indeed default to 2 in a fresh install, so it makes sense that that's what "changed unexpectedly" on you, if it had been changed to 1 in your prior cf2016 setup.
BTW, the wsversion can be set also at the app- and even the code-level, which can be valuable in some cases. But the admin is easiest if ALL publishing (and consuming) of web services on a given cf instance should use a given wsversion.
Please let us know if you try the change and if it works. (BTW, you may see no web services to "refresh", as that's for one's which are consumed in cf, rather than for ones which are published as you are discussing.)
/Charlie (troubleshooter, carehart. org)
Copy link to clipboard
Copied
Thanks Charlie for your positive response.
I have Not tried from Coldfusion Administrator. But tried it from cfc file like below :
<cfcomponent wsversion = "2" > when I set 2 its comes with Axis and when I set 1 it comes without axis :
<TOKENRequest><valUserName>?</valUserName></TOKENRequest>
Another one point, I want to highlight here this Re-Installed CF2016 Dev Server
with Update ( Update 16 ).
And the Web Services are exposed to third party consumer. So Not consumed from ColdFusion.
Thanks
Copy link to clipboard
Copied
I have Not tried from Coldfusion Administrator. But tried it from cfc file like below :
<cfcomponent wsversion = "2" > when I set 2 its comes with Axis and when I set 1 it comes without axis :
<TOKENRequest><valUserName>?</valUserName></TOKENRequest>
By sne_paul
Is Production using wsversion 1, whereas Development is using wsversion 2? As I mentioned earlier, you can just read the version from the respective ColdFusion Administrator Web Service pages of Production and Development.
Copy link to clipboard
Copied
And the Web Services are exposed to third party consumer. So Not consumed from ColdFusion.
By sne_paul
That doesn't matter, as long as the request from the third party is consistent with the WSDL. After all, the WSDL is just a description of your web service. It is not the web service.
Copy link to clipboard
Copied
I have generate WSDL by execute cfc file with ?wsdl param. Example if my cfc file name is test.cfc, i am generation wsdl by running script by ../test.cfc?wsdl
By sne_paul
Please share with us the 2 XML results that you get when you run:
http://your.production.domain/test.cfc?wsdl ( or https://your.production.domain/test.cfc?wsdl )
http://your.development.domain/test.cfc?wsdl ( or https://your.development.domain/test.cfc?wsdl )
Copy link to clipboard
Copied
I have generate WSDL by execute cfc file with ?wsdl param. Example if my cfc file name is test.cfc, i am generation wsdl by running script by ../test.cfc?wsdl
This same test.cfc file generation from CF2016 Production its coming proper like below :
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mob="http://mobservice.itcssap">
<soapenv:Header/>
<soapenv:Body>
<mob:TOKENRequest><mob:valUserName>?</mob:valUserName>
<mob:valPassword>?</mob:valPassword>
<mob:valDevUniqID>?</mob:valDevUniqID>
<mob:valDevName>?</mob:valDevName>
<mob:valDevPushNotif>?</mob:valDevPushNotif>
</mob:TOKENRequest>
</soapenv:Body>
</soapenv:Envelope>
But same CFC when I running from freshly installed CF2016 Development version its generation like below :
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:axis="http://ws.apache.org/axis2">
<soap:Header/>
<soap:Body>
<axis:TOKENRequest>
<!--Optional:-->
<axis:valUserName>?</axis:valUserName>
<!--Optional:-->
<axis:valPassword>?</axis:valPassword>
<!--Optional:-->
<axis:valDevUniqID>?</axis:valDevUniqID>
<!--Optional:-->
<axis:valDevName>?</axis:valDevName>
<!--Optional:-->
<axis:valDevPushNotif>?</axis:valDevPushNotif>
</axis:TOKENRequest>
</soap:Body>
</soap:Envelope>
By sne_paul
Something just occurred to me. Are these XMLs the response you get when you make a request to the web service?
Copy link to clipboard
Copied
I am sharing with you an example of a WSDL file.

