Click here to Skip to main content
11,438,007 members (51,403 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# WebService
Hello all,

I have an axis2 web service. How I can consume it in my wpf(C#) application. I would like to create a proxy class and refer it in my wpf application. I have tried it as follows , but didn't get solution....

wsdl http://192.168.1.152:8084/axis2/services/MyService.MyHttpSoap11Endpoint/

Meanwhile I could successfully create a proxy class of a webservice created using .net ..

wsdl http://localhost:50749/Service1.asmx

Regards
Sebastian
Posted 19-Sep-12 22:07pm
Edited 19-Sep-12 22:44pm
v2

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

You need to use ServiceModel Metadata Utility Tool (Svcutil.exe)[^], not wsdl

[Update]
Use WCF Express Interop Bindings[^]

The WCF Express Interop bindings is a Visual Studio extension that walks the developer through clear and simple questions about the type of interop they need between a WCF service and the main Java servers:
  • Oracle WebLogic
  • Oracle Metro
  • IBM WebSphere
  • Apache Axis2

Best regards
Espen Harlinn
  Permalink  
v2
Comments
Sebastian T Xavier at 26-Sep-12 6:33am
   
I have tried it as follows and ended up in an exception,

svcutil /t:metadata http://192.168.1.125:8086/axis2/services/MyService.MyServiceHttpSoap11Endpoint

Here is the exception ..
----------------------------------------------------------------------
C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin>svcutil /t:metadata http://192.168.1.125:8086/axis2/services/xyzService.xyzServiceHttpSoap11Endpoint
Microsoft (R) Service Model Metadata Tool
[Microsoft (R) Windows (R) Communication Foundation, Version 3.0.4506.2152]
Copyright (c) Microsoft Corporation. All rights reserved.

Attempting to download metadata from 'http://192.168.1.125:8086/axis2/services/xyzService.xyzServiceHttpSoap11Endpoint' using WS-Metadata Exchange or DISCO.
Microsoft (R) Service Model Metadata Tool
[Microsoft (R) Windows (R) Communication Foundation, Version 3.0.4506.2152]
Copyright (c) Microsoft Corporation. All rights reserved.

Error: Cannot obtain Metadata from http://192.168.1.125:8086/axis2/services/xyzService.xyzServiceHttpSoap11Endpoint

If this is a Windows (R) Communication Foundation service to which you have access, please check that you have enabled metadata publishing at the specified address. For help enabling metadata publishing, please refer to the MSDN documentation at http://go.microsoft.com/fwlink/?LinkId=65455.

WS-Metadata Exchange Error URI: http://192.168.1.125:8086/axis2/services/xyzService.xyzServiceHttpSoap11Endpoint

Metadata contains a reference that cannot be resolved: 'http://192.168.1.125:8086/axis2/services/xyzService.xyzServiceHttpSoap11Endpoint'.

Could not connect to http://192.168.1.125:8086/axis2/services/xyzService.xyzServiceHttpSoap11Endpoint. TCP error code 10061: No connection could be made because the target machine actively refused it 192.168.1.125:8086.

Unable to connect to the remote server
No connection could be made because the target machine actively refused it 192.168.1.125:8086

HTTP GET Error
URI: http://192.168.1.125:8086/axis2/services/xyzService.xyzServiceHttpSoap11Endpoint

There was an error downloading 'http://192.168.1.125:8086/axis2/services/xyzService.xyzServiceHttpSoap11Endpoint'.

Unable to connect to the remote server

No connection could be made because the target machine actively refused it 192.168.1.125:8086

If you would like more help, type "svcutil /?"
--------------------------------------------------------------------------------

Am I doing something wrong?

Sebastian
Espen Harlinn at 26-Sep-12 6:38am
   
Try opening http://192.168.1.125:8086/axis2/services/xyzService.xyzServiceHttpSoap11Endpoint/wsdl in your browser, you should see the xml for the wsdl.
Sebastian T Xavier at 26-Sep-12 6:42am
   
This is what I got when I opened it in browser...

----------------------------------
This XML file does not appear to have any style information associated with it. The document tree is shown below.

The endpoint reference (EPR) for the Operation not found is /axis2/services/xyzService.xyzServiceHttpSoap11Endpoint/wsdl and the WSA Action = null

-----------------------------------------
Espen Harlinn at 26-Sep-12 6:56am
   
I don't have anything that uses axis2 here at the office, but I should have something at home - I'll get back to you later ...
Sebastian T Xavier at 26-Sep-12 7:26am
   
That would be great..... Thanks
Espen Harlinn at 26-Sep-12 16:59pm
   
Have a look at:
http://wso2.com/blogs/thesource/2011/06/connecting-microsoft-services-to-wso2-just-got-a-whole-lot-easier/
and
http://wcf.codeplex.com/wikipage?title=WCF%20Express%20Interop%20Bindings

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web01 | 2.8.150506.1 | Last Updated 26 Sep 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100