开发者

Visual Studio/.NET: Added Java-based web service reference using wsdl but can't find it [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 10 years ago.

I am trying to add a java-based web service reference to my .NET project using a WSDL generated by it, but every time I have added it, I cannot find it from the code, let alone invoke its one webmethod.

I can add it alright, and it shows up in my project tree, but I cannot see the methods and I cannot find or access the webservice from my code. When I right click it and try to view it in the object browser, it doesn't show up. What gives?

This is the contents of the wsdl (I left out the data types to keep it small):

  <?xml version="1.0"?>
  <wsdl:definitions xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
        xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
        xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
        xmlns:tns="http://logiasoftware.fi/H开发者_如何转开发andyManifestFargoOnRamp2010_01/" 
        targetNamespace="http://logiasoftware.fi/HandyManifestFargoOnRamp2010_01/">

      <wsdl:message name="Response">
          <wsdl:part name="DefaultInput" element="tns:Response"/>
      </wsdl:message>
      <wsdl:message name="Request">
          <wsdl:part name="DefaultOutput" element="Request"/>
      </wsdl:message>

    <wsdl:portType name="HandyManifestFargoOnRampServiceSoap">
        <wsdl:operation name="SaveFCO">
            <wsdl:input message="tns:Request"/>
              <wsdl:output message="tns:Response"/>
        </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="HandyManifestFargoOnRampServiceSoap" type="tns:HandyManifestFargoOnRampServiceSoap">
        <soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
        <wsdl:operation name="SaveFCO">
            <soap:operation soapAction="http://logiasoftware.fi/HandyManifestFargoOnRampService/SaveFCO" style="document"/>
            <wsdl:input>
                <soap:body use="literal"/>
            </wsdl:input>
              <wsdl:output>
                <soap:body use="literal"/>
            </wsdl:output>
            <wsdl:fault name="GenericSoapFault">
                <soap:fault name="GenericSoapFault" use="literal"/>
                </wsdl:fault>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="HandyManifestFargoOnRampService">
        <wsdl:port name="HandyManifestFargoOnRampServiceSoap" binding="tns:HandyManifestFargoOnRampServiceSoap">
            <soap:address location="http://logiasoftware.fi/HandyManifestFargoOnRampService/"/>
        </wsdl:port>
    </wsdl:service>
  </wsdl:definitions>

UPDATE

Trying to run the wsdl through svcutil.exe gives me some interesting error messages:

 R1014: The children of the soap:Body element in a ENVELOPE MUST be namespace qualified. The use of unqualified element names may cause naming conflicts, therefore qualified names must be used for the children of soap:Body.
   -  Part 'DefaultOutput' of message 'Request' from service description with targetNamespace='http://logiasoftware.fi/HandyManifestFargoOnRamp2010_01/'.

and...

 Error: Unable to import binding 'HandyManifestFargoOnRampServiceSoap' from namespace 'http://logiasoftware.fi/HandyManifestFargoOnRamp2010_01/'.
   - Unable to import operation 'SaveFCO'.
   - The element 'http://logiasoftware.fi/HandyManifestFargoOnRamp2010_01/:Response' is missing.

So this tells me that the message elements should have the same namespace specified (http://logiasoftware.fi/) in the sections below:

<wsdl:message name="Response">
    <wsdl:part name="DefaultInput" element="tns:Response"/>
</wsdl:message>
<wsdl:message name="Request">
    <wsdl:part name="DefaultOutput" element="Request"/>
</wsdl:message>

But how do I do that?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜