4 Replies Latest reply on Dec 8, 2015 1:40 PM by benl85641302

    Coldfusion generated WSDL showing wrong targetNameSpace

    Chakri

      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)

      <?xml version="1.0" encoding="UTF-8"?>

      <wsdl:definitions targetNamespace="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>

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

       

      Prod WSDL (not working)

       

      <?xml version="1.0" encoding="UTF-8"?>

      wsdl:definitions targetNamespace="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>

      <schema targetNamespace="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.