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

3555Re: [soaplite] A Simple Example (Perl SOAP Server, VB.NET Client)

Expand Messages
  • Nayana Hettiarachchi
    May 3 8:29 AM
    • 0 Attachment
      You might be having an issue with NameSpaces, .NET is very picky about
      namespaces in XML documents, i have posted a good working example on a
      SOAP::Lite server to a .NET Client search in the group you will find it,

      cheers

      Nayana


      Christopher Parker wrote:

      > ***This is a possible duplicate. I posted this morning, and still
      > nothing. If this is a duplicate message, please accept my
      > apologies.***
      >
      > Hello all,
      >
      > I'm trying to get communications working between a Perl SOAP::Lite
      > server and a .NET client application. I have three things written to
      > test this:
      >
      > 1.) WSDL Document
      > 2.) Perl SOAP::Lite Server (CGI)
      > 3.) Visual Basic .NET Client
      >
      > When I add the WSDL document as a Web Reference to my VB.NET client
      > and try to run my client application, I get this error:
      >
      > "An unhandled exception of type 'System.
      > Web.Services.Protocols.SoapHeaderException' occurred in
      > system.web.services.dll
      >
      > "Additional information: Denied access to method (sayHello) in class
      > (main) at C:/Perl/site/lib/SOAP/Lite.pm line 2159."
      >
      > I'm assuming my problem is with my Perl server, then? I don't
      > understand how this is possible. My entire SOAP server is here:
      >
      > #########################
      > #!c:/perl/bin/perl.exe -w
      > # Location: http://localhost/cgi-bin/Hello.cgi
      > use strict;
      >
      > use SOAP::Transport::HTTP;
      >
      > SOAP::Transport::HTTP::CGI
      > -> dispatch_to('Hello')
      > -> handle;
      >
      > package Hello;
      >
      > sub sayHello
      > {
      > return "Hello world!";
      > }
      > #########################
      >
      >
      > I'm doubting the problem is with my WSDL, either. It's here:
      >
      > <!---------------------->
      > <?xml version="1.0" encoding="UTF-8"?>
      > <definitions name="HelloService"
      > targetNamespace="http://www.helloWSDL"
      > xmlns="http://schemas.xmlsoap.org/wsdl/"
      > xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
      > xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
      > xmlns:tns="http://www.helloWSDL"
      > xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      > <types/>
      > <message name="sayHelloRequest"/>
      > <message name="sayHelloResponse">
      > <part name="arg0" type="xsd:string"/>
      > </message>
      > <portType name="Hello">
      > <operation name="sayHello">
      > <input message="tns:sayHelloRequest"/>
      > <output message="tns:sayHelloResponse"/>
      > </operation>
      > </portType>
      > <binding name="HelloBinding" type="tns:Hello">
      > <soap:binding style="rpc"
      > transport="http://schemas.xmlsoap.org/soap/http"/>
      > <operation name="sayHello">
      > <soap:operation soapAction="http://www.helloWSDL/sayHello"/>
      > <input>
      > <soap:body
      > encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      > namespace="http://www.helloWSDL" use="encoded"/>
      > </input>
      > <output>
      > <soap:body
      > encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      > namespace="http://www.helloWSDL" use="encoded"/>
      > </output>
      > </operation>
      > </binding>
      > <service name="HelloService">
      > <port binding="tns:HelloBinding" name="HelloPort">
      > <soap:address location="http://localhost/cgi-bin/Hello.cgi"/>
      > </port>
      > </service>
      > </definitions>
      > <!---------------------->
      >
      > In case this WSDL looks faimilar, that's because I ripped it from
      > http://www.novell.com/documentation/lg/workbench41/docs/jbroker-
      > web/docs/tutorial/helloWSDL-1.htm (appears second on Google when you
      > search for "hello world wsdl").
      >
      > I'm able to successfully add this as a Web Reference to my VB.NET
      > project and I'm able to browse the method (sayHello) via my class
      > browser. So, I'm stumped. Is there anything I'm forgetting to do? Is
      > there anything I'm doing that I shouldn't be doing?
      >
      > Thanks.
      >
      > --
      > Parker
      >
      >
      > ------------------------------------------------------------------------
      > *Yahoo! Groups Links*
      >
      > * To visit your group on the web, go to:
      > http://groups.yahoo.com/group/soaplite/
      >
      > * To unsubscribe from this group, send an email to:
      > soaplite-unsubscribe@yahoogroups.com
      > <mailto:soaplite-unsubscribe@yahoogroups.com?subject=Unsubscribe>
      >
      > * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
      > Service <http://docs.yahoo.com/info/terms/>.
      >
      >

      --
      Nayana Hettiarachchi

      Trade Tech, Inc.
      Comprehensive E-Business Solutions for Freight Management

      12600 S.E. 38th Street Suite 150
      Bellevue, WA 98006 USA

      Phone: +1 (425) 837.9000
      Fax: +1 (425) 837.9008
      Mobile: +1 (206) 617.8079

      On the web at: http://www.tradetech.net
    • Show all 4 messages in this topic