以下是WebLogic Workshop服务的代码:
public class WLWExample
{ /** @jws:operation */
public String getHelloMessage()
{ return "Hello from WebLogic Workshop!";
}}
以下是.NETWeb服务的代码:
using System.ComponentModel;
using System.Web.Services;
namespace DotNetExample
{
public class Service1 : WebService
{
public Service1()
{ InitializeComponent(); }
private IContainer components = null;
private void InitializeComponent() {}
protected override void Dispose( bool disposing
)
{ if(disposing && components != null) components.Dispose();
base.Dispose(disposing); }
[WebMethod] public string getHelloMessage()
{ return "Hello from Visual Studio .NET!";
} }}