Quantcast
Channel: Adobe Community : Discussion List - ColdFusion
Viewing all articles
Browse latest Browse all 6243

Coldfusion generated WSDL showing wrong targetNameSpace

$
0
0

We recently migration our application from CF 8 to CF 11 Update 3. There is a ColdFusion web service that is being consumed by a .NET application. The cfcomponent tag is specified with the following attributes

 

<cfcomponent

style = "rpc"

bindingname = "component1.cfcSoapBinding"

namespace="http://#cgi.host_name#/<webservicefolder>/component1.cfc"

serviceaddress="http://#cgi.host_name#/<webservicefolder>/component1.cfc"

porttypename = "component1"

serviceportname = "component1.cfc"

>

In Our Test server (same CF version), the webservice is invoked by the .NET application successfully. However, in Production server, the .NET application is getting error when trying to invoke the service. The error information at .NET end is :

 

There is an error in XML document (31, 31).

at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)     at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle)     at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)     at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)....

 

When we compared the WSDL generated from QA & Prod server, we noticed difference in tns1 and targetNamespace.

 

QA WSDL (which is working)

<?xmlversion="1.0"encoding="UTF-8"?>

<wsdl:definitionstargetNamespace="serviceaddress"xmlns:apachesoap="http://xml.apache.org/xml-soap"xmlns:impl="serviceaddress"xmlns:intf="serviceaddress"xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"xmlns:tns1="http://<webservicefolder>"xmlns:tns2="http://rpc.xml.coldfusion"xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"xmlns:xsd="http://www.w3.org/2001/XMLSchema">

  <wsdl:types>

   <schematargetNamespace="http://<webservicefolder>"xmlns="http://www.w3.org/2001/XMLSchema">

 

Prod WSDL (not working)

 

<?xmlversion="1.0"encoding="UTF-8"?>

wsdl:definitionstargetNamespace="serviceaddress"xmlns:apachesoap="http://xml.apache.org/xml-soap"xmlns:impl="serviceaddress"xmlns:intf="serviceaddress"xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"xmlns:tns1=http://<webservicefolder>.<rootfolder>  xmlns:tns2="http://rpc.xml.coldfusion"xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<wsdl:types>

<schematargetNamespace="http://<webservicefolder>.<rootfolder>"xmlns="http://www.w3.org/2001/XMLSchema">

 

You can see the difference in the tns2, targetNamespace value. We do not understand how this namespace is getting generated and why it is different in the 2 servers with same code & same CF version.

 

Any help on this will be greatly appreciated.


Viewing all articles
Browse latest Browse all 6243

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>