Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/278.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/402.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
获取java.lang.IllegalArgumentException:C#.net web服务调用中的参数类型不匹配_C#_Java_Asp.net_Web Services - Fatal编程技术网

获取java.lang.IllegalArgumentException:C#.net web服务调用中的参数类型不匹配

获取java.lang.IllegalArgumentException:C#.net web服务调用中的参数类型不匹配,c#,java,asp.net,web-services,C#,Java,Asp.net,Web Services,我需要从我的c#asp.net web应用程序调用Java web服务。我有以下方法的wsdl信息,并生成了代理类 <?xml version="1.0" encoding="UTF-8" ?> - <wsdl:definitions targetNamespace="http://myapp.mycompany.com/elo/services/ApplicationService" xmlns:apachesoap="http://xml.apache.org/xml-so

我需要从我的c#asp.net web应用程序调用Java web服务。我有以下方法的wsdl信息,并生成了代理类

<?xml version="1.0" encoding="UTF-8" ?>
- <wsdl:definitions targetNamespace="http://myapp.mycompany.com/elo/services/ApplicationService" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://myapp.mycompany.com/elo/services/ApplicationService" xmlns:intf="http://myapp.mycompany.com/elo/services/ApplicationService" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns1="urn:com:mycompany:elo:Trinity:classes" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  - <!-- 
WSDL created by Apache Axis version: 1.4
Built on Apr 22, 2006 (06:55:48 PDT)

  -->
  - <wsdl:types>
    - <schema targetNamespace="http://myapp.mycompany.com/elo/services/ApplicationService" xmlns="http://www.w3.org/2001/XMLSchema">
      <import namespace="urn:com:mycompany:elo:Trinity:classes" />
      <import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
      -
      - <complexType name="SubmitPreApprovalApplicationRequest">
        - <complexContent>
          - <extension base="impl:ApplicationServiceRequest">
            - <sequence>
              <element name="AfpPreApprovalRequestId" type="xsd:int" />
              <element maxOccurs="1" minOccurs="0" name="CoBorrower" nillable="true" type="tns1:CoBorrower" />
              <element name="PrimaryApplicant" nillable="true" type="tns1:PrimaryApplicant" />
              <element name="RequestedAmount" nillable="true" type="xsd:decimal" />
              <element name="RequestedTermInMonths" type="xsd:int" />
              <element name="numberofCoborrowers" type="xsd:int" />
            </sequence>
          </extension>
        </complexContent>
      </complexType>
      - <complexType name="SubmitPreApprovalApplicationResponse">
        - <sequence>
          <element name="ResponseStatus" nillable="true" type="tns1:ResponseStatus" />
        </sequence>
      </complexType>
    </schema>
    - 
  </wsdl:types>
  - 
  - <wsdl:message name="submitPreApprovalApplicationResponse">
    <wsdl:part name="submitPreApprovalApplicationReturn" type="impl:SubmitPreApprovalApplicationResponse" />
  </wsdl:message>
  - <wsdl:message name="submitPreApprovalApplicationRequest">
    <wsdl:part name="request" type="impl:SubmitPreApprovalApplicationRequest" />
  </wsdl:message>
  - <wsdl:portType name="ApplicationService">
    - <wsdl:operation name="submitPreApprovalApplication" parameterOrder="request">
      <wsdl:input message="impl:submitPreApprovalApplicationRequest" name="submitPreApprovalApplicationRequest" />
      <wsdl:output message="impl:submitPreApprovalApplicationResponse" name="submitPreApprovalApplicationResponse" />
    </wsdl:operation>
    - 
  </wsdl:portType>
  - <wsdl:binding name="ApplicationServiceSoapBinding" type="impl:ApplicationService">
    <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
    - <wsdl:operation name="submitPreApprovalApplication">
      <wsdlsoap:operation soapAction="" />
      - <wsdl:input name="submitPreApprovalApplicationRequest">
        <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://classes.Trinity.elo.mycompany.com" use="encoded" />
      </wsdl:input>
      - <wsdl:output name="submitPreApprovalApplicationResponse">
        <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://myapp.mycompany.com/elo/services/ApplicationService" use="encoded" />
      </wsdl:output>
    </wsdl:operation>
    - 
  </wsdl:binding>
  - <wsdl:service name="ApplicationServiceService">
    - <wsdl:port binding="impl:ApplicationServiceSoapBinding" name="ApplicationService">
      <wsdlsoap:address location="http://myapp.mycompany.com/elo/services/ApplicationService" />
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>
有什么问题吗?有人能帮我解决吗


附言:我从wsdl中删除了一些对象,以通过必要的细节最小化页面大小。

您是否检查了submitPreApprovalApplication函数的签名。您确定参数的类型为SubmitPreApprovalApplicationRequest@MicrosoftPS我只得到了wsdl和webservice url。它是由其他人创建的,我看不到代码。但您可以在WSDL文件中看到它
       ApplicationServiceService service = new ApplicationServiceService();

       string version=  service.getVersion(); // This call works and fetches version

       service.Credentials = System.Net.CredentialCache.DefaultCredentials;
       SubmitPreApprovalApplicationRequest req = new SubmitPreApprovalApplicationRequest();
           req.prop=value// preparing all the properties

       res = service.submitPreApprovalApplication(req); //HERE IS THAT ERROR