You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-user@axis.apache.org by Sam Carleton <sc...@miltonstreet.com> on 2009/03/31 02:08:34 UTC

How to wrap the Calculator WSDL for .Net?

I just created a .Net client to call the sample Calculator service that is
in the Axis2/C source and it has the standard calling convention of:

Calculator.addResponse add(Calculator.addRequest request);

According to what I read in "Developing Web Services with Apache Axis2" by
Kent Ka lok Tong, if the WSDL is correctly wrapped, the calling convention
would be along these lines:

int add(int param1, int param2);

>From what I can tell the WSDL is correctly wrapped.  Is there something else
I need to be doing?  The way I am adding the reference to the C# code is by
going to Service References, right clicking and selecting Add Service
Reference, and finally giving it the wsdl:
http://localhost:8042/axis2/services/Calculator?wsdl

I have not changed anything about the Calculator service.

Sam

Re: How to wrap the Calculator WSDL for .Net?

Posted by Uthaiyashankar <sh...@wso2.com>.
Hi Sam,

You can use svcutil.exe to generate C# code. When you generate code using
svcutil, you can see the code is generated as you expected. I am attaching
the code I generated using svcutil for your reference.

Regards,
Shankar

On Tue, Mar 31, 2009 at 5:38 AM, Sam Carleton <sc...@miltonstreet.com>wrote:

> I just created a .Net client to call the sample Calculator service that is
> in the Axis2/C source and it has the standard calling convention of:
>
> Calculator.addResponse add(Calculator.addRequest request);
>
> According to what I read in "Developing Web Services with Apache Axis2" by
> Kent Ka lok Tong, if the WSDL is correctly wrapped, the calling convention
> would be along these lines:
>
> int add(int param1, int param2);
>
> From what I can tell the WSDL is correctly wrapped.  Is there something
> else I need to be doing?  The way I am adding the reference to the C# code
> is by going to Service References, right clicking and selecting Add Service
> Reference, and finally giving it the wsdl:
> http://localhost:8042/axis2/services/Calculator?wsdl
>
> I have not changed anything about the Calculator service.
>
> Sam
>



-- 
S.Uthaiyashankar
Software Architect
WSO2 Inc.
http://wso2.com/ - "The Open Source SOA Company"