c# soap client with perl server

G

Greg

Hello I am trying to talk to my perl soap server. Right now I just
have a very simple hello world perl server doing soap in the
background. I can talk to the perl very easily with a perl client. I
can not get the C# to talk correctly to the perl though. I am trying
to use the SoapClient provided in the web services 3 toolkit.
Included is my code. Hi is the method on the server. I am not sure
what mutators I should use in the SoapEnvelope object in order to call
the right method on my perl end. Right now I get the following error:

SOAPAction shall match 'uri#method' if present (got 'urn#Hi', expected
'http://tempuri.org/#string'

Any help would be appreciated.

using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Web.Services3;
using Microsoft.Web.Services3.Messaging;

namespace ConsoleApplication1
{
public class MyReceiver : SoapClient
{
public MyReceiver(Uri destination) : base(destination) { }

[SoapMethod("Hi")]
public SoapEnvelope Hi(SoapEnvelope envelope)
{
SoapEnvelope env = null;
try
{
env = base.SendRequestResponse("urn#Hi", envelope);
}
catch (Exception e)
{
System.Console.Write(e.Message);
}
return env;
}
}
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top