3 Replies Latest reply on Jun 26, 2015 2:55 AM by Chakri

    custom wsdl namespace issue

    vlad.v

      I’m trying to use a custom wsdl with our own namespaces.  However, CF10 is partially overwriting with its own namespaces. 

       

      Here it the partial component definition.

      <cfcomponent output="false" wsdlfile="webservice.wsdl" namespace="http://mynamespace/" >

       

      Here is the partial response with highlighted namespace issue. Nowhere do I define the http://ws.webir/xsd namespace in the wsdl file.

       

      <soapenv:Body>

       

      <ns:searchByNmadIdsResult xsi:type="ax23:SearchByNmadIdsResponse" xmlns:ns="http://mynamespace/" xmlns:ax21="http://rpc.xml.coldfusion/xsd" xmlns:ax23="http://ws.webir/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

       

      <ax23:WFFaultList xsi:type="ax23:WFFault">

       

      <ax23:faultCode>getPacsRequest.requestIdIsRequired</ax23:faultCode>

       

      <ax23:faultReasonText>RequestId is required.</ax23:faultReasonText>

       

      <ax23:faultType>APPL</ax23:faultType>

       

      <ax23:severity>ERROR</ax23:severity>

       

      </ax23:WFFaultList>

       

      <ax23:WFFaultList xsi:type="ax23:WFFault">

       

      <ax23:faultCode>678 code</ax23:faultCode>

       

      <ax23:faultReasonText>reason</ax23:faultReasonText>

       

      <ax23:faultType>type</ax23:faultType>

       

      <ax23:severity>severity</ax23:severity>

       

      </ax23:WFFaultList>

       

       

        Please advice.

       

        • 1. Re: custom wsdl namespace issue
          biggermork

          It's hard to say what is going on with your webservices without more of the wsdl to go on.   if you could include more code and more of the results that you are seeing, that would make it easier to see what is going on.   It appears that you are using the defaults for CF and that you are using wsdl 1.2.  Based on what it looks like, it appears that you are asking about the namespace that is added automatically to your system.  I think that the namespace corresponds to the directory of the location of your webservices relative to your root web directory.  That namespace is added to your wsdl automatically by CF in order to make sure that it is unique among any other webservices that you might put up on that same site.   A further question might be, is this causing a problem when trying to access the web service?  generally that shouldn't be causing a problem when trying to access your web service.  At least, i would assume that it shouldn't.  The error that you included in your request indicated that the error was caused because you didn't include the " RequestId " in your soap request.

           

          Hope that helps.  if you can include more information, perhaps I can help further.

          • 2. Re: custom wsdl namespace issue
            vlad.v Level 1

            Thank you for response.  You are correct it does use the relative folder structure as a part of the namespace.  It creates a problem for the consuming side, it expects the namespace I specified in cfcomponent definition to de-serialize the content. Don’t worry about the WFFaultList, it is used for testing purposes.  

             

             

            Here is the wsdl:

             

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

             

            <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"

             

            xmlns:ns1="http://org.apache.axis2/xsd"

             

            xmlns:ns="http://service.mydomain.com/provider/cts/webir/operations/cts_webir_operations2015/""

             

            xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"

             

            xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"

             

            xmlns:xs="http://www.w3.org/2001/XMLSchema"

             

            xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"

             

            xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"

             

            xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"

             

            xmlns:ctswebirtype="http://service.mydomain.com/provider/cts/webir/entity/cts_webir_type2015/"

             

            xmlns:msg="http://service.mydomain.com/entity/message/2007/"

             

            targetNamespace="http://service.mydomain.com/provider/cts/webir/operations/cts_webir_operations2015/">

             

                  <wsdl:types>

             

            <xs:schema targetNamespace="http://service.mydomain.com/provider/cts/webir/operations/cts_webir_operations2015/">

             

            <xs:import namespace="http://service.mydomain.com/provider/cts/webir/entity/cts_webir_type2015/" schemaLocation="webir_types2015.xsd"/>

             

            <xs:import namespace="http://service.mydomain.com/entity/message/2007/" schemaLocation="message2007.xsd"/>

             

             

             

            <xs:complexType name="searchByNmadIds">

             

            <xs:sequence>

             

            <xs:element maxOccurs="unbounded" minOccurs="0" name="nmadIds" nillable="true" type="xs:anyType"/>

             

            </xs:sequence>

             

            </xs:complexType>

             

             

             

            <xs:complexType name="searchByNmadIdsResponse">

             

            <xs:sequence>

             

            <xs:element name="nmads" type="ctswebirtype:WebirNmadSummary_Type" minOccurs="0" maxOccurs="unbounded"></xs:element>

             

            <xs:element ref="msg:WFFaultList" minOccurs="0" maxOccurs="1"></xs:element>

             

            </xs:sequence>

             

            </xs:complexType>

             

            </xs:schema>

             

                  </wsdl:types>

             

                  <wsdl:message name="searchByNmadIdsRequest">

             

            <wsdl:part name="parameters" element="ns:searchByNmadIds"/>

             

                  </wsdl:message>

             

                  <wsdl:message name="searchByNmadIdsResponse">

             

            <wsdl:part name="parameters" element="ns:searchByNmadIdsResponse"/>

             

                  </wsdl:message>

             

                  <wsdl:portType name="nmadPortType">

             

            <wsdl:operation name="searchByNmadIds">

             

            <wsdl:input message="ns:searchByNmadIdsRequest" name="searchByNmadIds"/>

             

            <wsdl:output message="ns:searchByNmadIdsResponse" name="searchByNmadIdsResponse" />

             

            </wsdl:operation>

             

                  </wsdl:portType>

             

                  <wsdl:binding name="cfcSoap12Binding" type="ns:nmadPortType">

             

            <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>

             

            <wsdl:operation name="searchByNmadIds">

             

            <soap12:operation soapAction="urn:searchByNmadIds" style="document"/>

             

            <wsdl:input>

             

            <soap12:body use="literal"/>

             

            </wsdl:input>

             

            <wsdl:output>

             

            <soap12:body use="literal"/>

             

            </wsdl:output>

             

            </wsdl:operation>

             

                  </wsdl:binding>

             

                  <wsdl:service name="webservice.cfc">

             

            <wsdl:port name="cfcHttpSoap12Endpoint" binding="ns:cfcSoap12Binding">

             

            <soap12:address location="http://localhost:8500/webir/ws/webservice.cfc"/>

             

            </wsdl:port>

             

                  </wsdl:service>

             

            </wsdl:definitions>

             

             

             

            Here is the response:

             

            <soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">

             

               <soapenv:Body>

             

                  <ns:searchByNmadIdsResponse xmlns:ns="http://service.mydomain.com/provider/cts/webir/operations/cts_webir_operations2015/">

             

                     <ns:return xsi:type="ax23:SearchByNmadIdsResponse" xmlns:ax21="http://rpc.xml.coldfusion/xsd" xmlns:ax23="http://ws.webir/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

             

            <ax23:WFFaultList xsi:type="ax23:WFFault">

             

            <ax23:faultCode>getPacsRequest.requestIdIsRequired</ax23:faultCode>

             

            <ax23:faultReasonText>RequestId is required.</ax23:faultReasonText>

             

            <ax23:faultType>APPL</ax23:faultType>

             

            <ax23:severity>ERROR</ax23:severity>

             

            </ax23:WFFaultList>

             

            <ax23:WFFaultList xsi:type="ax23:WFFault">

             

            <ax23:faultCode>678 code</ax23:faultCode>

             

            <ax23:faultReasonText>reason</ax23:faultReasonText>

             

            <ax23:faultType>type</ax23:faultType>

             

            <ax23:severity>severity</ax23:severity>

             

            </ax23:WFFaultList>

             

            <ax23:nmads xsi:type="ax23:WebirNmadSummary_Type">

             

            <ax23:active>false</ax23:active>

             

            <ax23:displayName>NEW ATCOR LLC</ax23:displayName>

             

            <ax23:nmadId>123</ax23:nmadId>

             

            </ax23:nmads>

             

            <ax23:nmads xsi:type="ax23:WebirNmadSummary_Type">

             

            <ax23:active>false</ax23:active>

             

            <ax23:displayName>NON-REPORTABLE DOMESTIC PAYEE</ax23:displayName>

             

            <ax23:nmadId>1</ax23:nmadId>

             

            </ax23:nmads>

             

                     </ns:return>

             

                  </ns:searchByNmadIdsResponse>

             

               </soapenv:Body>

             

            </soapenv:Envelope>

            • 3. Re: custom wsdl namespace issue
              Chakri

              Hello, This seems to be similar to the issue I am facing. The ColdFusion generated namespace is causing issue at the consumer side. Can you let me know if you got a solution for this.

               

              Thanks