none
Unable to generate a service reference from a WSDL RRS feed

  • Question

  • I am wondering if an expert could take a peek at this WSDL and point out why VS2013 generates an essentially empty Reference.cs when I add the service reference for it?  It appears to be a java generated web service.  The add service reference wizard recognizes all the operations correctly. 

    Thanks a lot in advance.

    For your convenience, I copied the file to the following:

    <?xml version="1.0" encoding="utf-8"?>
    <wsdl:definitions xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:intf="http://webservices2" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns1="http://rpc.xml.coldfusion" xmlns:impl="http://webservices2" targetNamespace="http://webservices2" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
      <wsdl:types>
        <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://rpc.xml.coldfusion">
          <xsd:import namespace="http://xml.apache.org/xml-soap" />
          <xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
          <xsd:complexType name="CFCInvocationException">
            <xsd:sequence />
          </xsd:complexType>
        </xsd:schema>
      </wsdl:types>
      <wsdl:message name="exportAllParamsDateRangeXMLResponse">
        <wsdl:part name="exportAllParamsDateRangeXMLReturn" type="apachesoap:Document" />
      </wsdl:message>
      <wsdl:message name="exportStationCodesXMLRequest" />
      <wsdl:message name="NERRFilterStationCodesXMLNewRequest">
        <wsdl:part name="NERRFilter" type="xsd:string" />
      </wsdl:message>
      <wsdl:message name="exportAllParamsXMLResponse">
        <wsdl:part name="exportAllParamsXMLReturn" type="apachesoap:Document" />
      </wsdl:message>
      <wsdl:message name="exportSingleParamXMLNewResponse">
        <wsdl:part name="exportSingleParamXMLNewReturn" type="apachesoap:Document" />
      </wsdl:message>
      <wsdl:message name="exportAllParamsXMLNewResponse">
        <wsdl:part name="exportAllParamsXMLNewReturn" type="apachesoap:Document" />
      </wsdl:message>
      <wsdl:message name="NERRFilterStationCodesXMLResponse">
        <wsdl:part name="NERRFilterStationCodesXMLReturn" type="apachesoap:Document" />
      </wsdl:message>
      <wsdl:message name="CFCInvocationException">
        <wsdl:part name="fault" type="tns1:CFCInvocationException" />
      </wsdl:message>
      <wsdl:message name="exportAllParamsDateRangeXMLNewResponse">
        <wsdl:part name="exportAllParamsDateRangeXMLNewReturn" type="apachesoap:Document" />
      </wsdl:message>
      <wsdl:message name="exportSingleParamXMLNewRequest">
        <wsdl:part name="Station_Code" type="xsd:string" />
        <wsdl:part name="recs" type="xsd:string" />
        <wsdl:part name="param" type="xsd:string" />
        <wsdl:part name="wildcard" type="xsd:string" />
      </wsdl:message>
      <wsdl:message name="exportSingleParamXMLRequest">
        <wsdl:part name="Station_Code" type="xsd:string" />
        <wsdl:part name="recs" type="xsd:string" />
        <wsdl:part name="param" type="xsd:string" />
      </wsdl:message>
      <wsdl:message name="exportSingleParamXMLResponse">
        <wsdl:part name="exportSingleParamXMLReturn" type="apachesoap:Document" />
      </wsdl:message>
      <wsdl:message name="exportStationCodesXMLNewResponse">
        <wsdl:part name="exportStationCodesXMLNewReturn" type="apachesoap:Document" />
      </wsdl:message>
      <wsdl:message name="exportAllParamsXMLRequest">
        <wsdl:part name="Station_Code" type="xsd:string" />
        <wsdl:part name="recs" type="xsd:string" />
      </wsdl:message>
      <wsdl:message name="NERRFilterStationCodesXMLNewResponse">
        <wsdl:part name="NERRFilterStationCodesXMLNewReturn" type="apachesoap:Document" />
      </wsdl:message>
      <wsdl:message name="exportStationCodesXMLNewRequest">
        <wsdl:part name="wildcard" type="xsd:string" />
      </wsdl:message>
      <wsdl:message name="exportAllParamsDateRangeXMLRequest">
        <wsdl:part name="Station_Code" type="xsd:string" />
        <wsdl:part name="minDate" type="xsd:string" />
        <wsdl:part name="maxDate" type="xsd:string" />
        <wsdl:part name="param" type="xsd:string" />
      </wsdl:message>
      <wsdl:message name="NERRFilterStationCodesXMLRequest">
        <wsdl:part name="NERRFilter" type="xsd:string" />
      </wsdl:message>
      <wsdl:message name="exportAllParamsXMLNewRequest">
        <wsdl:part name="Station_Code" type="xsd:string" />
        <wsdl:part name="recs" type="xsd:string" />
        <wsdl:part name="wildcard" type="xsd:string" />
      </wsdl:message>
      <wsdl:message name="exportAllParamsDateRangeXMLNewRequest">
        <wsdl:part name="Station_Code" type="xsd:string" />
        <wsdl:part name="minDate" type="xsd:string" />
        <wsdl:part name="maxDate" type="xsd:string" />
        <wsdl:part name="param" type="xsd:string" />
        <wsdl:part name="wildcard" type="xsd:string" />
      </wsdl:message>
      <wsdl:message name="exportStationCodesXMLResponse">
        <wsdl:part name="exportStationCodesXMLReturn" type="apachesoap:Document" />
      </wsdl:message>
      <wsdl:portType name="Requests">
        <wsdl:operation name="exportAllParamsXML" parameterOrder="Station_Code recs">
          <wsdl:input name="exportAllParamsXMLRequest" message="impl:exportAllParamsXMLRequest" />
          <wsdl:output name="exportAllParamsXMLResponse" message="impl:exportAllParamsXMLResponse" />
          <wsdl:fault name="CFCInvocationException" message="impl:CFCInvocationException" />
        </wsdl:operation>
        <wsdl:operation name="NERRFilterStationCodesXML" parameterOrder="NERRFilter">
          <wsdl:input name="NERRFilterStationCodesXMLRequest" message="impl:NERRFilterStationCodesXMLRequest" />
          <wsdl:output name="NERRFilterStationCodesXMLResponse" message="impl:NERRFilterStationCodesXMLResponse" />
          <wsdl:fault name="CFCInvocationException" message="impl:CFCInvocationException" />
        </wsdl:operation>
        <wsdl:operation name="exportAllParamsXMLNew" parameterOrder="Station_Code recs wildcard">
          <wsdl:input name="exportAllParamsXMLNewRequest" message="impl:exportAllParamsXMLNewRequest" />
          <wsdl:output name="exportAllParamsXMLNewResponse" message="impl:exportAllParamsXMLNewResponse" />
          <wsdl:fault name="CFCInvocationException" message="impl:CFCInvocationException" />
        </wsdl:operation>
        <wsdl:operation name="NERRFilterStationCodesXMLNew" parameterOrder="NERRFilter">
          <wsdl:input name="NERRFilterStationCodesXMLNewRequest" message="impl:NERRFilterStationCodesXMLNewRequest" />
          <wsdl:output name="NERRFilterStationCodesXMLNewResponse" message="impl:NERRFilterStationCodesXMLNewResponse" />
          <wsdl:fault name="CFCInvocationException" message="impl:CFCInvocationException" />
        </wsdl:operation>
        <wsdl:operation name="exportSingleParamXMLNew" parameterOrder="Station_Code recs param wildcard">
          <wsdl:input name="exportSingleParamXMLNewRequest" message="impl:exportSingleParamXMLNewRequest" />
          <wsdl:output name="exportSingleParamXMLNewResponse" message="impl:exportSingleParamXMLNewResponse" />
          <wsdl:fault name="CFCInvocationException" message="impl:CFCInvocationException" />
        </wsdl:operation>
        <wsdl:operation name="exportSingleParamXML" parameterOrder="Station_Code recs param">
          <wsdl:input name="exportSingleParamXMLRequest" message="impl:exportSingleParamXMLRequest" />
          <wsdl:output name="exportSingleParamXMLResponse" message="impl:exportSingleParamXMLResponse" />
          <wsdl:fault name="CFCInvocationException" message="impl:CFCInvocationException" />
        </wsdl:operation>
        <wsdl:operation name="exportStationCodesXML">
          <wsdl:input name="exportStationCodesXMLRequest" message="impl:exportStationCodesXMLRequest" />
          <wsdl:output name="exportStationCodesXMLResponse" message="impl:exportStationCodesXMLResponse" />
          <wsdl:fault name="CFCInvocationException" message="impl:CFCInvocationException" />
        </wsdl:operation>
        <wsdl:operation name="exportAllParamsDateRangeXML" parameterOrder="Station_Code minDate maxDate param">
          <wsdl:input name="exportAllParamsDateRangeXMLRequest" message="impl:exportAllParamsDateRangeXMLRequest" />
          <wsdl:output name="exportAllParamsDateRangeXMLResponse" message="impl:exportAllParamsDateRangeXMLResponse" />
          <wsdl:fault name="CFCInvocationException" message="impl:CFCInvocationException" />
        </wsdl:operation>
        <wsdl:operation name="exportAllParamsDateRangeXMLNew" parameterOrder="Station_Code minDate maxDate param wildcard">
          <wsdl:input name="exportAllParamsDateRangeXMLNewRequest" message="impl:exportAllParamsDateRangeXMLNewRequest" />
          <wsdl:output name="exportAllParamsDateRangeXMLNewResponse" message="impl:exportAllParamsDateRangeXMLNewResponse" />
          <wsdl:fault name="CFCInvocationException" message="impl:CFCInvocationException" />
        </wsdl:operation>
        <wsdl:operation name="exportStationCodesXMLNew" parameterOrder="wildcard">
          <wsdl:input name="exportStationCodesXMLNewRequest" message="impl:exportStationCodesXMLNewRequest" />
          <wsdl:output name="exportStationCodesXMLNewResponse" message="impl:exportStationCodesXMLNewResponse" />
          <wsdl:fault name="CFCInvocationException" message="impl:CFCInvocationException" />
        </wsdl:operation>
      </wsdl:portType>
      <wsdl:binding name="requests.cfcSoapBinding" type="impl:Requests">
        <wsdlsoap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc" />
        <wsdl:operation name="exportAllParamsXML">
          <wsdlsoap:operation soapAction="" />
          <wsdl:input name="exportAllParamsXMLRequest">
            <wsdlsoap:body use="encoded" namespace="http://webservices2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
          </wsdl:input>
          <wsdl:output name="exportAllParamsXMLResponse">
            <wsdlsoap:body use="encoded" namespace="http://webservices2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
          </wsdl:output>
          <wsdl:fault name="CFCInvocationException">
            <wsdlsoap:fault use="encoded" name="CFCInvocationException" namespace="http://webservices2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
          </wsdl:fault>
        </wsdl:operation>
        <wsdl:operation name="NERRFilterStationCodesXML">
          <wsdlsoap:operation soapAction="" />
          <wsdl:input name="NERRFilterStationCodesXMLRequest">
            <wsdlsoap:body use="encoded" namespace="http://webservices2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
          </wsdl:input>
          <wsdl:output name="NERRFilterStationCodesXMLResponse">
            <wsdlsoap:body use="encoded" namespace="http://webservices2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
          </wsdl:output>
          <wsdl:fault name="CFCInvocationException">
            <wsdlsoap:fault use="encoded" name="CFCInvocationException" namespace="http://webservices2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
          </wsdl:fault>
        </wsdl:operation>
        <wsdl:operation name="exportAllParamsXMLNew">
          <wsdlsoap:operation soapAction="" />
          <wsdl:input name="exportAllParamsXMLNewRequest">
            <wsdlsoap:body use="encoded" namespace="http://webservices2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
          </wsdl:input>
          <wsdl:output name="exportAllParamsXMLNewResponse">
            <wsdlsoap:body use="encoded" namespace="http://webservices2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
          </wsdl:output>
          <wsdl:fault name="CFCInvocationException">
            <wsdlsoap:fault use="encoded" name="CFCInvocationException" namespace="http://webservices2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
          </wsdl:fault>
        </wsdl:operation>
        <wsdl:operation name="NERRFilterStationCodesXMLNew">
          <wsdlsoap:operation soapAction="" />
          <wsdl:input name="NERRFilterStationCodesXMLNewRequest">
            <wsdlsoap:body use="encoded" namespace="http://webservices2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
          </wsdl:input>
          <wsdl:output name="NERRFilterStationCodesXMLNewResponse">
            <wsdlsoap:body use="encoded" namespace="http://webservices2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
          </wsdl:output>
          <wsdl:fault name="CFCInvocationException">
            <wsdlsoap:fault use="encoded" name="CFCInvocationException" namespace="http://webservices2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
          </wsdl:fault>
        </wsdl:operation>
        <wsdl:operation name="exportSingleParamXMLNew">
          <wsdlsoap:operation soapAction="" />
          <wsdl:input name="exportSingleParamXMLNewRequest">
            <wsdlsoap:body use="encoded" namespace="http://webservices2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
          </wsdl:input>
          <wsdl:output name="exportSingleParamXMLNewResponse">
            <wsdlsoap:body use="encoded" namespace="http://webservices2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
          </wsdl:output>
          <wsdl:fault name="CFCInvocationException">
            <wsdlsoap:fault use="encoded" name="CFCInvocationException" namespace="http://webservices2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
          </wsdl:fault>
        </wsdl:operation>
        <wsdl:operation name="exportSingleParamXML">
          <wsdlsoap:operation soapAction="" />
          <wsdl:input name="exportSingleParamXMLRequest">
            <wsdlsoap:body use="encoded" namespace="http://webservices2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
          </wsdl:input>
          <wsdl:output name="exportSingleParamXMLResponse">
            <wsdlsoap:body use="encoded" namespace="http://webservices2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
          </wsdl:output>
          <wsdl:fault name="CFCInvocationException">
            <wsdlsoap:fault use="encoded" name="CFCInvocationException" namespace="http://webservices2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
          </wsdl:fault>
        </wsdl:operation>
        <wsdl:operation name="exportStationCodesXML">
          <wsdlsoap:operation soapAction="" />
          <wsdl:input name="exportStationCodesXMLRequest">
            <wsdlsoap:body use="encoded" namespace="http://webservices2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
          </wsdl:input>
          <wsdl:output name="exportStationCodesXMLResponse">
            <wsdlsoap:body use="encoded" namespace="http://webservices2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
          </wsdl:output>
          <wsdl:fault name="CFCInvocationException">
            <wsdlsoap:fault use="encoded" name="CFCInvocationException" namespace="http://webservices2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
          </wsdl:fault>
        </wsdl:operation>
        <wsdl:operation name="exportAllParamsDateRangeXML">
          <wsdlsoap:operation soapAction="" />
          <wsdl:input name="exportAllParamsDateRangeXMLRequest">
            <wsdlsoap:body use="encoded" namespace="http://webservices2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
          </wsdl:input>
          <wsdl:output name="exportAllParamsDateRangeXMLResponse">
            <wsdlsoap:body use="encoded" namespace="http://webservices2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
          </wsdl:output>
          <wsdl:fault name="CFCInvocationException">
            <wsdlsoap:fault use="encoded" name="CFCInvocationException" namespace="http://webservices2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
          </wsdl:fault>
        </wsdl:operation>
        <wsdl:operation name="exportAllParamsDateRangeXMLNew">
          <wsdlsoap:operation soapAction="" />
          <wsdl:input name="exportAllParamsDateRangeXMLNewRequest">
            <wsdlsoap:body use="encoded" namespace="http://webservices2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
          </wsdl:input>
          <wsdl:output name="exportAllParamsDateRangeXMLNewResponse">
            <wsdlsoap:body use="encoded" namespace="http://webservices2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
          </wsdl:output>
          <wsdl:fault name="CFCInvocationException">
            <wsdlsoap:fault use="encoded" name="CFCInvocationException" namespace="http://webservices2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
          </wsdl:fault>
        </wsdl:operation>
        <wsdl:operation name="exportStationCodesXMLNew">
          <wsdlsoap:operation soapAction="" />
          <wsdl:input name="exportStationCodesXMLNewRequest">
            <wsdlsoap:body use="encoded" namespace="http://webservices2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
          </wsdl:input>
          <wsdl:output name="exportStationCodesXMLNewResponse">
            <wsdlsoap:body use="encoded" namespace="http://webservices2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
          </wsdl:output>
          <wsdl:fault name="CFCInvocationException">
            <wsdlsoap:fault use="encoded" name="CFCInvocationException" namespace="http://webservices2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
          </wsdl:fault>
        </wsdl:operation>
      </wsdl:binding>
      <wsdl:service name="RequestsService">
        <wsdl:port name="requests.cfc" binding="impl:requests.cfcSoapBinding">
          <wsdlsoap:address location="http://cdmo.baruch.sc.edu/webservices2/requests.cfc" />
        </wsdl:port>
      </wsdl:service>
    </wsdl:definitions>


    Hong


    Wednesday, May 7, 2014 9:43 PM

Answers

  • Hi,

    As you said that service is java generated web service, then for creating a client from the wsdl, then maybe you can check the following:

    The main options are to use:

    1. JAX-WS, using the wsimport tool.
    2. Apache AXIS2, using wsdl2java.

    Both links provide code examples. There are also options for creating dynamic SOAP clients but the generated ones are easiest.

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Thursday, May 8, 2014 6:47 AM
    Moderator
  • Thanks, Amy, for your persistent help.

    I ran across that article before, but unfortunately adding a web reference does not work for this case.

    The most helpful article that I have found so far is this one.  It offers a very good start point, but one has to tweak the code by trial and error to make it work for a specific CF generated web service. 


    Hong

    Friday, May 16, 2014 2:58 AM

All replies

  • Hi,

    As you said that service is java generated web service, then for creating a client from the wsdl, then maybe you can check the following:

    The main options are to use:

    1. JAX-WS, using the wsimport tool.
    2. Apache AXIS2, using wsdl2java.

    Both links provide code examples. There are also options for creating dynamic SOAP clients but the generated ones are easiest.

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Thursday, May 8, 2014 6:47 AM
    Moderator
  • Thanks a lot for the prompt response, Amy.

    Could you provide a tip on how to use the java files generated by the tools in a Universal project in VS2013?

     


    Hong

    Thursday, May 8, 2014 11:44 AM
  • Could you provide a tip on how to use the java files generated by the tools in a Universal project in VS2013?

     


    Hong

    Hello,

    Just to generate the java classes from wsdl to me the best tool is "cxf wsdl2java". Its pretty simple and easy to use. I have found some complexities with some data type in axis2. But unfortunately you can't use those client stub code in your android application because android environment doesn't allow the "java/javax" package name in compiling time unless you rename the package name.

    In background it uses "cxf wsdl2java" to generate the java client stub for android platform for you, And I have written some sources to consume the web service in a smarter way.

    Just give the wsdl file location it will give you the sources and some library. you have to just put the sources and the libraries in your project. and you can just call it in some "method call fashion" just we do in our enterprise project, you don't need to know the namespace/soap action etc. For example, you have a service to login, what you need to do is :

    LoginService service = new LoginService ( );
    Login login = service.getLoginPort ( );
    LoginServiceResponse resp = login.login ( "someUser", "somePass" );
    Thanks.
    • Proposed as answer by dns jinung Wednesday, May 14, 2014 9:19 AM
    Wednesday, May 14, 2014 9:18 AM
  • Thank you, adegsdf, for the detailed instructions.

    I am terribly sorry if my question has confused you by assuming too much.  When I mentioned "universal project", I meant the new type of project called "Universal Project" for Windows and Windows Phone.  It is not related to any Android project.



    Hong

    Wednesday, May 14, 2014 10:33 AM
  • Hi,

    From your description, I know that you want to conumse the java web service from a C# client, then maybe the following article can help you:
    #How to invoke Java web service using C#:
    http://www.codeproject.com/Articles/32313/How-to-invoke-Java-web-service-in-ASP-net-using-C .

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, May 16, 2014 2:38 AM
    Moderator
  • Thanks, Amy, for your persistent help.

    I ran across that article before, but unfortunately adding a web reference does not work for this case.

    The most helpful article that I have found so far is this one.  It offers a very good start point, but one has to tweak the code by trial and error to make it work for a specific CF generated web service. 


    Hong

    Friday, May 16, 2014 2:58 AM