Loading ...
Sorry, an error occurred while loading the content.

WSDL and .NET

Expand Messages
  • Efim Furman
    Hello, I have a very simple SOAP::Lite mod_perl server and a simple SOAP::Lite client. Everything works great on the perl side, however when I tried to
    Message 1 of 1 , Apr 27, 2007
    • 0 Attachment
      Hello,

      I have a very simple SOAP::Lite mod_perl server and a simple SOAP::Lite client. Everything works great on the perl side, however when I tried to  generate a wsdl file using WSDL::Generator, and use that WSDL in .NET, I am receiving an exception:

      <faultstring>Failed to access class (wsdl::WorldFunctions.wsdl) at /usr/lib/perl5/site_perl/5.6.1/SOAP/Lite.pm line 2239.

      I noticed that SOAP XML generated by the perl client is quite different from the XML generated by .NET. I've seeen a few posts with similar issues, but none of them had a resolution!

      PERL (GOOD)
        <?xml version="1.0" encoding="UTF-8" ?>
      - <SOAP-ENV:Envelope xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema">
      - <SOAP-ENV:Body>
      - <namesp1:Hello xmlns:namesp1="/WorldFunctions">
        <c-gensym3 xsi:type="xsd:string">Joe</c-gensym3>
        </namesp1:Hello>
        </SOAP-ENV:Body>
        </SOAP-ENV:Envelope>

      BAD (.NET)
        <?xml version="1.0" encoding="utf-8" ?>
      - <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      - <soap:Body>
        <HelloRequest xmlns="http://xxx.no-ip.com/wsdl/WorldFunctions.wsdl">Fima</HelloRequest>
        </soap:Body>
        </soap:Envelope>


      My WSDL:
      <?xml version="1.0" encoding="utf-16"?>
      <definitions xmlns:tns="http://xxx.no-ip.com/soap/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsdl="http://xxx.no-ip.com/wsdl/WorldFunctions.wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="WorldFunctions" targetNamespace="http://xxx.no-ip.com/soap/" xmlns="http://schemas.xmlsoap.org/wsdl/">
        <types>
          <xsd:schema targetNamespace="http://xxx.no-ip.com/wsdl/WorldFunctions.wsdl">
            <xsd:element name="GoodByeRequest" type="xsd:string" />
            <xsd:element name="GoodByeResponse" type="xsd:string" />
            <xsd:element name="HelloRequest" type="xsd:string" />
            <xsd:element name="HelloResponse" type="xsd:string" />
          </xsd:schema>
        </types>
        <message name="GoodByeRequest">
          <part name="GoodByeRequestSoapMsg" element="xsdl:GoodByeRequest" />
        </message>
        <message name="GoodByeResponse">
          <part name="GoodByeResponseSoapMsg" element="xsdl:GoodByeResponse" />
        </message>
        <message name="HelloRequest">
          <part name="HelloRequestSoapMsg" element="xsdl:HelloRequest" />
        </message>
        <message name="HelloResponse">
          <part name="HelloResponseSoapMsg" element="xsdl:HelloResponse" />
        </message>
        <portType name="WorldFunctionsWorldFunctionsPortType">
          <operation name="GoodBye">
            <input message="tns:GoodByeRequest" />
            <output message="tns:GoodByeResponse" />
          </operation>
          <operation name="Hello">
            <input message="tns:HelloRequest" />
            <output message="tns:HelloResponse" />
          </operation>
        </portType>
        <binding name="WorldFunctionsWorldFunctionsBinding" type="tns:WorldFunctionsWorldFunctionsPortType">
          <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
          <operation name="GoodBye">
            <soap:operation soapAction="" style="document" />
            <input>
              <soap:body use="literal" />
            </input>
            <output>
              <soap:body use="literal" />
            </output>
          </operation>
          <operation name="Hello">
            <soap:operation soapAction="" style="document" />
            <input>
              <soap:body use="literal" />
            </input>
            <output>
              <soap:body use="literal" />
            </output>
          </operation>
        </binding>
        <service name="WorldFunctions">
          <documentation>
                  Simple Hello World SOAP Service.
              </documentation>
          <port name="WorldFunctionsWorldFunctionsPort" binding="tns:WorldFunctionsWorldFunctionsBinding">
            <soap:address location="http://xxx.no-ip.com/soap" />
          </port>
        </service>

    Your message has been successfully submitted and would be delivered to recipients shortly.