A newbie query about Soap4R and dot net web services

Ask a Question related to Ruby, Design and Development.

  1. #1

    Default A newbie query about Soap4R and dot net web services

    Can anyone help me with this Soap4r problem?

    I have created a simple web service in dot net using Visual studio and
    have modified a sample program from the Soap4r distribution to access
    it.

    Here's the program:

    require 'soap/rpc/driver'

    class Exchange
    ForeignServer = "http://dmoorexp/calcwebservice/service1.asmx"
    MyServiceNamespace = 'http://dlogic.com/dmwebservices'

    def initialize
    @drv = SOAP::RPC::Driver.new(ForeignServer, MyServiceNamespace)
    @drv.add_method("Mul", "x", "y")
    end

    def mul(x, y)
    @drv.call(Mul)
    return @drv.Mul(x, y)
    end
    end

    e = Exchange.new()
    e.mul(10,20)

    when run I get the message:

    #<SOAP::Mapping::Object:0x2dd5d90>: Server did not recognize the value
    of HTTP Header
    SOAPAction: . (SOAP::FaultError)

    Here is the soap header that the visual studio diagnostic program says
    is expected.

    POST /calcwebservice/service1.asmx HTTP/1.1
    Host: dmoorexp
    Content-Type: text/xml; charset=utf-8
    Content-Length: length
    SOAPAction: "http://dlogic.com/dmwebservices/Mul"

    Any suggestions as to how I can diagnose what is going wrong? I am a
    newcomer to Soap and Soap4r. Is there any good tutorial material
    covering how to access dot net webservices?

    Thanks for anything!
    David Moore
    David Moore Guest

  2. Similar Questions and Discussions

    1. web services problem processing embedded query resultset
      We ran into an interesting problem with using queries and web services. This was on MX 6.1 Windows. This may be known already, though we didn't find...
    2. Example of data Snyc for a newbie to Web Services
      I would like to be able to syncronize data between to databases using Web Services. I cannot directly connect to the SQL server outside the network...
    3. AW: A newbie query about Soap4R and dot net web services
      No, your examples/answers are really helpful, i just copy and paste! -----Ursprüngliche Nachricht----- Von: NAKAMURA, Hiroshi Gesendet:...
    4. How good is SOAP4R?
      I am looking at candidates for a soap server that I need to build. It will be handling upto 50 concurrent connections and passing some decent...
    5. [ANN] soap4r/1.5.0 with wsdl4r/0.0.3
      Hi, all, soap4r/1.5.0 is out. RAA: http://www.ruby-lang.org/en/raa-list.rhtml?name=soap4r Release Note:...
  3. #2

    Default Re: A newbie query about Soap4R and dot net web services

    Hi,
    > From: "David Moore" <davem1957@yahoo.com>
    > Sent: Tuesday, November 18, 2003 11:12 PM
    > @drv = SOAP::RPC::Driver.new(ForeignServer, MyServiceNamespace)
    > @drv.add_method("Mul", "x", "y")
    Try this;
    @drv.add_method_with_soapaction("Mul", "http://dlogic.com/dmwebservices/Mul", "x", "y")

    Regards,
    // NaHi


    NAKAMURA, Hiroshi Guest

  4. #3

    Default Re: A newbie query about Soap4R and dot net web services

    Hi,

    last week I encountered the same problem.
    I modified a sample program in the soap4r distribution.
    Hope i helps.

    Roland

    -------------------------------
    ###file: service.rb

    require "soap/rpc/driver"
    require "RechnerServiceModule"
    include RechnerServiceModule

    server = 'http://localhost:8080/WSSE_Service/RechnerService.asmx'

    wiredump_dev=STDERR

    service = SOAP::RPC::Driver.new(server, RechnerServiceModule::InterfaceNS)
    service.wiredump_dev=wiredump_dev

    service.default_encodingstyle = SOAP::EncodingStyle::ASPDotNetHandler::Namespace
    RechnerServiceModule::add_method(service)

    result = service.mul(2,2)

    print("Result: ", result)


    ###file:servicemodule.rb
    module RechnerServiceModule
    InterfaceNS = 'http://schemas.t-systems.com/wse/RechnerService'
    Methods=[['mul', 'a','b'],['minus', 'a','b'],['plus', 'a','b'],['hello']]

    def RechnerServiceModule.add_method(drv)
    Methods.each do |method, *param|
    drv.add_method_with_soapaction(method, InterfaceNS+"/#{ method }", *param)
    end
    end
    end

    SchmittR@t-systems.com Guest

  5. #4

    Default Re: A newbie query about Soap4R and dot net web services

    Hi,
    > From: <SchmittR@t-systems.com>
    > Sent: Tuesday, November 18, 2003 11:48 PM
    > last week I encountered the same problem.
    > I modified a sample program in the soap4r distribution.
    > Hope i helps.
    [snip]

    This is far better than my answer. Thanks.

    Regards,
    // NaHi


    NAKAMURA, Hiroshi Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139